Files
pkgsrc-ng/misc/screen/patches/patch-ai
2016-01-21 23:40:00 +01:00

38 lines
1.1 KiB
Plaintext

$NetBSD: patch-ai,v 1.5 2015/02/13 04:44:40 rodent Exp $
This glues in the code from patch-am (see also path-al and patch-an).
--- os.h.orig 2014-04-26 10:58:35.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,18 @@ 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>
-# 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