forked from iannakin/macports
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathquagga-patch2.diff
More file actions
70 lines (65 loc) · 2.03 KB
/
Copy pathquagga-patch2.diff
File metadata and controls
70 lines (65 loc) · 2.03 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
- sourced from http://marc.info/?l=quagga-dev&m=122470855231006&w=2
- configure.ac - pam module - we are searching for pam_misc.h also in pam/ - default location in OSX
- vtysh/vtysh_user.c - Added #ifdef and #include for pam on OSX.
- configure.ac - bsd linkdetect hack - On OSX we assume that bsdlinkdetect is not supported.
- OSX have tested ifm_status value but don't have ifi_link_state value in if_data struct.
--- configure.ac
+++ configure.ac
@@ -530,6 +530,9 @@ case "$host" in
AC_CHECK_LIB(nsl, main)
CURSES=-lcurses
;;
+ *-darwin*)
+ opsys=darwin
+ ;;
*-linux*)
opsys=gnu-linux
AC_DEFINE(GNU_LINUX,,GNU Linux)
@@ -604,6 +604,12 @@ if test "$with_libpam" = "yes"; then
pam_conv_func="misc_conv"
],
[], QUAGGA_INCLUDES)
+ AC_CHECK_HEADER([pam/pam_misc.h],
+ [AC_DEFINE(HAVE_PAM_MISC_H,,Have pam_misc.h)
+ AC_DEFINE(PAM_CONV_FUNC,misc_conv,Have misc_conv)
+ pam_conv_func="misc_conv"
+ ],
+ [], QUAGGA_INCLUDES)
AC_CHECK_HEADER([security/openpam.h],
[AC_DEFINE(HAVE_OPENPAM_H,,Have openpam.h)
AC_DEFINE(PAM_CONV_FUNC,openpam_ttyconv,Have openpam_ttyconv)
@@ -917,6 +917,7 @@ AC_MSG_RESULT(no))
dnl ---------------------------------------------------------------
dnl figure out how to check link-state
dnl ---------------------------------------------------------------
+if test "$opsys" != "darwin"; then
AC_CHECK_HEADER([net/if.h],
[AC_CHECK_HEADER( [net/if_media.h],
[m4_define([LINK_DETECT_INCLUDES],
@@ -929,6 +929,7 @@ AC_CHECK_HEADER([net/if.h],
[],
QUAGGA_INCLUDES)],
[], QUAGGA_INCLUDES )
+fi
dnl ------------------------
dnl TCP_MD5SIG socket option
--- vtysh/vtysh_user.c
+++ vtysh/vtysh_user.c
@@ -25,10 +25,18 @@
#include <pwd.h>
#ifdef USE_PAM
+#ifdef __APPLE__
+#include <pam/pam_appl.h>
+#else
#include <security/pam_appl.h>
+#endif
#ifdef HAVE_PAM_MISC_H
+#ifdef __APPLE__
+#include <pam/pam_misc.h>
+#else
#include <security/pam_misc.h>
#endif
+#endif
#ifdef HAVE_OPENPAM_H
#include <security/openpam.h>
#endif