blob: a2bcc03011dd35b13740dccbd4af5beda0c9c2c9 (
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
|
$NetBSD: patch-ai,v 1.3 2011/03/14 06:15:23 rumko Exp $
--- os.h.orig 2002-01-08 15:42:33.000000000 +0000
+++ os.h
@@ -62,9 +62,6 @@
# undef exit
#endif /* sun */
-#ifndef linux /* all done in <errno.h> */
-extern int errno;
-#endif /* linux */
#ifndef HAVE_STRERROR
/* No macros, please */
#undef strerror
@@ -260,9 +257,18 @@
#endif
#if defined(UTMPOK) || defined(BUGGYGETLOGIN)
-# if defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux)
+# if (defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux)) \
+ || (defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000)) \
+ || (defined(__DragonFly__) && (__DragonFly_version >= 200902))
# include <utmpx.h>
-# define UTMPFILE UTMPX_FILE
+# if defined(__NetBSD__)
+# define UTMPFILE _PATH_UTMPX
+# define NetBSD_UTMP
+# elif defined(__DragonFly__)
+# define UTMPFILE _PATH_UTMPX
+# else
+# define UTMPFILE UTMPX_FILE
+# endif
# define utmp utmpx
# define getutent getutxent
# define getutid getutxid
|