This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] tst-rec-dlopen: Fix build fail due to missing inclusion of string.h
- From: Stefan Liebler <stli at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Date: Mon, 6 Jun 2016 10:49:45 +0200
- Subject: [PATCH] tst-rec-dlopen: Fix build fail due to missing inclusion of string.h
- Authentication-results: sourceware.org; auth=none
Hi,
on S390, I get an compile error for dlfcn/tst-rec-dlopen.c:
tst-rec-dlopen.c: In function âmallocâ:
tst-rec-dlopen.c:101:4: error: implicit declaration of function âstrlenâ
[-Werror=implicit-function-declaration]
(void) write (STDOUT_FILENO, message, strlen (message));
^
tst-rec-dlopen.c:101:42: error: incompatible implicit declaration of
built-in function âstrlenâ [-Werror]
(void) write (STDOUT_FILENO, message, strlen (message));
^
tst-rec-dlopen.c:112:42: error: incompatible implicit declaration of
built-in function âstrlenâ [-Werror]
(void) write (STDOUT_FILENO, message, strlen (message));
^
This patch adds the missing "#include <string.h>" for strlen.
Okay to commit?
Bye
Stefan
ChangeLog:
* dlfcn/tst-rec-dlopen.c: Include string.h.
diff --git a/dlfcn/tst-rec-dlopen.c b/dlfcn/tst-rec-dlopen.c
index 07e0cc4..0269851 100644
--- a/dlfcn/tst-rec-dlopen.c
+++ b/dlfcn/tst-rec-dlopen.c
@@ -23,6 +23,7 @@
#include <stdalign.h>
#include <sys/mman.h>
#include <unistd.h>
+#include <string.h>
#define DSO "moddummy1.so"
#define FUNC "dummy1"