diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2016-08-27 04:31:23 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2016-08-27 04:31:23 +0000 |
commit | b78573b16f2931ddd2b1c56cb4d5b3b3c5aa0f50 (patch) | |
tree | 176c8dff7c540ea4ee9c9d7cf3bd2a4e4316c358 /regress | |
parent | 94508368fe9fcfa951fefda38e7272faee63ab10 (diff) |
ALL HAIL ELF!
Since <sys/param.h> isn't needed for __ELF__, pull in <stdio.h> for NULL
ok deraadt@
Diffstat (limited to 'regress')
-rw-r--r-- | regress/libexec/ld.so/link-order/prog/prog.c | 12 |
1 files 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 <sys/param.h> +#include <stdio.h> #include <err.h> #include <dlfcn.h> -#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(); |