mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-08-05 10:48:03 -04:00
44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
$NetBSD: patch-ai,v 1.7 2016/06/20 16:04:44 ryoon Exp $
|
|
|
|
This glues in the code from patch-am (see also path-al and patch-an).
|
|
|
|
--- os.h.orig 2016-06-19 19:41:03.000000000 +0000
|
|
+++ os.h
|
|
@@ -71,9 +71,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
|
|
@@ -250,9 +247,15 @@ extern int errno;
|
|
#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>
|
|
+#if defined(UTMPX_FILE) /* GNU extension */
|
|
# define UTMPFILE UTMPX_FILE
|
|
+#elif defined(_PATH_UTMPX)
|
|
+# define UTMPFILE _PATH_UTMPX
|
|
+#endif
|
|
# define utmp utmpx
|
|
# define getutent getutxent
|
|
# define getutid getutxid
|
|
@@ -261,6 +264,9 @@ extern int errno;
|
|
# define setutent setutxent
|
|
# define endutent endutxent
|
|
# define ut_time ut_xtime
|
|
+# if defined(__NetBSD__)
|
|
+# define NetBSD_UTMP
|
|
+# endif
|
|
# else /* SVR4 */
|
|
# include <utmp.h>
|
|
# endif /* SVR4 */
|