openbsd-ports/net/radiusd-cistron/patches/patch-src_sysdep_h
danh 4a235c98de unsigned long was assumed to be 32 bits. fixes a crash on sparc64
originally reported by Matt Hess.

ok naddy@
2002-09-30 15:19:40 +00:00

36 lines
1.0 KiB
Plaintext

$OpenBSD: patch-src_sysdep_h,v 1.4 2002/09/30 15:19:40 danh Exp $
--- src/sysdep.h.orig Fri Dec 1 11:13:24 2000
+++ src/sysdep.h Sun Sep 29 23:43:38 2002
@@ -16,7 +16,7 @@
# endif
#endif
-#if defined(__alpha) && (defined(__osf__) || defined(__linux__))
+#if defined(__alpha) && (defined(__osf__) || defined(__linux__)) || defined(__OpenBSD__)
typedef unsigned int UINT4;
#else
typedef unsigned long UINT4;
@@ -28,7 +28,7 @@ typedef unsigned long UINT4;
#include <string.h>
#endif
-#if defined(__FreeBSD__) || defined(bsdi)
+#if defined(__FreeBSD__) || defined(bsdi) || defined(__OpenBSD__)
# include <stdlib.h>
#else
# include <malloc.h>
@@ -70,6 +70,13 @@ typedef unsigned long UINT4;
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(bsdi)
# ifndef UTMP_FILE
# define UTMP_FILE "/var/run/utmp"
+# endif
+# define ut_user ut_name
+#endif
+#if defined(__OpenBSD__)
+# include <utmp.h>
+# ifndef UTMP_FILE
+# define UTMP_FILE _PATH_UTMP
# endif
# define ut_user ut_name
#endif