summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/grp/getgrent.c10
-rw-r--r--src/pwd/getpwent.c10
2 files changed, 12 insertions, 8 deletions
diff --git a/src/grp/getgrent.c b/src/grp/getgrent.c
index 3046d040..417e1ba2 100644
--- a/src/grp/getgrent.c
+++ b/src/grp/getgrent.c
@@ -1,3 +1,8 @@
+#if ((!defined _POSIX_C_SOURCE) || (_POSIX_C_SOURCE < 2))
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 2
+#endif
+
#include "sys/types.h"
#include <grp.h>
#include "stdlib.h"
@@ -9,14 +14,11 @@
#include "_grp.h"
#ifndef LINE_MAX
-#ifndef _POSIX2_LINE_MAX
-#include "limits/_POSIX2_LINE_MAX.c"
-#endif
#define LINE_MAX _POSIX2_LINE_MAX
#endif
#ifndef _XOPEN_SOURCE
- static
+static
#endif
struct group * getgrent(void)
diff --git a/src/pwd/getpwent.c b/src/pwd/getpwent.c
index 675f8aa3..cdf20e8e 100644
--- a/src/pwd/getpwent.c
+++ b/src/pwd/getpwent.c
@@ -1,3 +1,8 @@
+#if ((!defined _POSIX_C_SOURCE) || (_POSIX_C_SOURCE < 2))
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 2
+#endif
+
#include <sys/types.h>
#include <pwd.h>
#include <stdlib.h>
@@ -9,14 +14,11 @@
#include "_pwd.h"
#ifndef LINE_MAX
-#ifndef _POSIX2_LINE_MAX
-#include "limits/_POSIX2_LINE_MAX.c"
-#endif
#define LINE_MAX _POSIX2_LINE_MAX
#endif
#ifndef _XOPEN_SOURCE
- static
+static
#endif
struct passwd * getpwent(void)