blob: 05eea55a937204d914e4690be1b8d4837e55acfa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
$NetBSD: patch-qpasswd.h,v 1.2 2018/12/17 16:32:19 schmonz Exp $
Avoid Linuxisms. Handle _XOPEN_SOURCE on SunOS.
--- qpasswd.h.orig 2004-01-13 16:10:18.000000000 +0000
+++ qpasswd.h
@@ -1,21 +1,28 @@
#ifndef QP_QPASSWD_H
#define QP_QPASSWD_H
+#if defined(__sun) && !defined(_XOPEN_SOURCE)
+# if (__STDC_VERSION__-0 < 199901L)
+#define _XOPEN_SOURCE 500
+# else
+#define _XOPEN_SOURCE 600
+# endif
+#else
#define _XOPEN_SOURCE /* needed for crypt(3) */
+#endif
#define _BSD_SOURCE /* needed by initgroups(3) + fchdir(2) */
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/mman.h>
+#include <sys/wait.h>
#include <unistd.h>
#include <signal.h>
-#include <shadow.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
-#include <wait.h>
#include <time.h>
#include <grp.h>
#include <pwd.h>
|