Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1265521

[PATCH 1/2] selftests/mlock2: Add missing #define _GNU_SOURCE

From Geert Uytterhoeven <geert@linux-m68k.org>
Newsgroups linux.kernel
Subject [PATCH 1/2] selftests/mlock2: Add missing #define _GNU_SOURCE
Date 2015-11-09 11:20 +0100
Message-ID <qsRIm-55g-21@gated-at.bofh.it> (permalink)
References <qsRIm-55g-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On glibc 2.3.6:

    mlock2-tests.c: In function 'seek_to_smaps_entry':
    mlock2-tests.c:158: warning: implicit declaration of function 'getline'

According to the manpage of getline(), it needs _GNU_SOURCE before glibc
2.10.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 tools/testing/selftests/vm/mlock2-tests.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/vm/mlock2-tests.c b/tools/testing/selftests/vm/mlock2-tests.c
index 4431994aade2ef6f..cb247219f1f72889 100644
--- a/tools/testing/selftests/vm/mlock2-tests.c
+++ b/tools/testing/selftests/vm/mlock2-tests.c
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <sys/mman.h>
 #include <stdint.h>
 #include <stdio.h>
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] selftests/mlock2: Add missing #define _GNU_SOURCE Geert Uytterhoeven <geert@linux-m68k.org> - 2015-11-09 11:20 +0100
  Re: [PATCH 1/2] selftests/mlock2: Add missing #define _GNU_SOURCE Eric B Munson <emunson@akamai.com> - 2015-11-09 17:10 +0100

csiph-web