From: guenther Date: Sat, 27 Aug 2016 04:31:22 +0000 (+0000) Subject: ALL HAIL ELF! X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=adf29af4d33cc8ebb61fcaf46fb8c8988ee7fffc;p=openbsd ALL HAIL ELF! Since isn't needed for __ELF__, pull in for NULL ok deraadt@ --- diff --git a/regress/libexec/ld.so/link-order/prog/prog.c b/regress/libexec/ld.so/link-order/prog/prog.c index 28f9cfb6683..f445355c6dc 100644 --- a/regress/libexec/ld.so/link-order/prog/prog.c +++ b/regress/libexec/ld.so/link-order/prog/prog.c @@ -1,22 +1,16 @@ -#include +#include #include #include -#ifdef __ELF__ -#define C_LABEL(x) x -#else -#define C_LABEL(x) "_" ## x -#endif - int -main() +main(void) { void *handle = dlopen("libtest.so", DL_LAZY); void (*version)(void); if (handle == NULL) errx(1, "could not dynamically link libtest"); - version = dlsym(handle, C_LABEL("version")); + version = dlsym(handle, "version"); if (version == NULL) errx(2, "libtest did not define version()"); version();