summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2016-08-27 04:31:23 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2016-08-27 04:31:23 +0000
commitb78573b16f2931ddd2b1c56cb4d5b3b3c5aa0f50 (patch)
tree176c8dff7c540ea4ee9c9d7cf3bd2a4e4316c358 /regress
parent94508368fe9fcfa951fefda38e7272faee63ab10 (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.c12
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();