Skip to content

Commit

Permalink
Compile without <net/if_ppp.h>
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos committed Mar 3, 2024
1 parent 38b511d commit 15ee42a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ AC_CHECK_HEADERS([ \
libutil.h \
linux/if_tun.h \
mach/mach.h \
net/if_ppp.h \
pty.h \
semaphore.h \
util.h \
Expand Down
12 changes: 10 additions & 2 deletions src/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,22 @@
#include <unistd.h>
#include <arpa/inet.h>
#include <netinet/tcp.h>
#include <net/if_ppp.h>
#include <sys/ioctl.h>


#include <errno.h>
#include <signal.h>
#include <string.h>

#if !HAVE_NET_IF_PPP_H
#include <net/if_ppp.h>
#else
#define PPP_IP 0x21 /* Internet Protocol */
#define PPP_IPV6 0x57 /* Internet Protocol Version 6 */
#define PPP_IPCP 0x8021 /* IP Control Protocol */
#define PPP_LCP 0xc021 /* Link Control Protocol */
#define PPP_CHAP 0xc223 /* Cryptographic Handshake Auth. Protocol */
#endif

#if HAVE_MACH_MACH_H
/* this is typical for mach kernel used on Mac OS X */
#include <mach/mach.h>
Expand Down

0 comments on commit 15ee42a

Please sign in to comment.