From adf29af4d33cc8ebb61fcaf46fb8c8988ee7fffc Mon Sep 17 00:00:00 2001 From: guenther Date: Sat, 27 Aug 2016 04:31:22 +0000 Subject: [PATCH] ALL HAIL ELF! Since isn't needed for __ELF__, pull in for NULL ok deraadt@ --- regress/libexec/ld.so/link-order/prog/prog.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) 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(); -- 2.20.1