From: Paul Mackerras Date: Sun, 3 Feb 2013 06:35:43 +0000 (+1100) Subject: pppd: Arrange to use logwtmp from libutil on Linux X-Git-Tag: ppp-2.4.7~31 X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=9617a7eb137f4fee62799a677a9ecf8d834db3f5 pppd: Arrange to use logwtmp from libutil on Linux Idea stolen from Fedora ppp patches. Signed-off-by: Paul Mackerras --- diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux index fd71454..a74c914 100644 --- a/pppd/Makefile.linux +++ b/pppd/Makefile.linux @@ -73,6 +73,9 @@ PLUGIN=y # Enable EAP SRP-SHA1 authentication (requires libsrp) #USE_SRP=y +# Use libutil +USE_LIBUTIL=y + MAXOCTETS=y INCLUDE_DIRS= -I../include @@ -122,6 +125,11 @@ CFLAGS += -DHAVE_CRYPT_H=1 LIBS += -lcrypt endif +ifdef USE_LIBUTIL +CFLAGS += -DHAVE_LOGWTMP=1 +LIBS += -lutil +endif + ifdef NEEDDES ifndef USE_CRYPT LIBS += -ldes $(LIBS) diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index 2540c4f..72a7727 100644 --- a/pppd/sys-linux.c +++ b/pppd/sys-linux.c @@ -2147,6 +2147,7 @@ int ppp_available(void) return ok; } +#ifndef HAVE_LOGWTMP /******************************************************************** * * Update the wtmp file with the appropriate user name and tty device. @@ -2220,7 +2221,7 @@ void logwtmp (const char *line, const char *name, const char *host) } #endif } - +#endif /* HAVE_LOGWTMP */ /******************************************************************** *