[uClibc]pppd
Jason Heiss
jheiss at ofb.net
Tue Jul 10 00:25:04 UTC 2001
I've attached a patch with the changes I made to get it to compile.
It's mostly clean, but I'm not proud of the LASTLOG stuff. :)
(uClibc defines _PATH_LASTLOG but doesn't seem to implement lastlog.)
The steps are:
Extract tarball
Apply patch
./configure
make CC=/path/to/i386-uclibc-gcc
make install DESTDIR=/path/to/root
Don't know if it works yet, still having trouble getting PPPoE to
work. I've tried rp-pppoe (compiled fine but won't connect) and
the kernel PPPoE and associated ppp plugin (which won't compile for
me with uClibc). rp-pppoe works on the same box under Red Hat
compiled against glibc.
Jason
On Mon, Jul 09, 2001 at 01:05:35PM -0700, Richard Doyle wrote:
> I haven't had any luck compiling pppd (2.3.11 or 2.4.1) under uClibc.
> Has anyone done this? Any clues appreciated.
>
> -Richard
>
>
>
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://uclibc.org/mailman/listinfo/uclibc
-------------- next part --------------
diff -ur ppp-2.4.1.orig/pppd/Makefile.linux ppp-2.4.1/pppd/Makefile.linux
--- ppp-2.4.1.orig/pppd/Makefile.linux Wed Mar 7 21:00:35 2001
+++ ppp-2.4.1/pppd/Makefile.linux Mon Jul 9 14:00:02 2001
@@ -48,7 +48,7 @@
# doesn't yet.
#FILTER=y
-HAS_SHADOW=y
+#HAS_SHADOW=y
#USE_PAM=y
#HAVE_INET6=y
@@ -56,7 +56,7 @@
INCLUDE_DIRS= -I../include
-COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MULTILINK -DHAVE_MMAP
+COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DHAVE_MULTILINK -DHAVE_MMAP -DNO_DRAND48
CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
@@ -66,6 +66,7 @@
LIBS := -ldes $(LIBS)
else
CFLAGS += -DUSE_CRYPT=1
+LIBS := -lcrypt $(LIBS)
ifneq ($(wildcard /usr/include/crypt.h),)
CFLAGS += -DHAVE_CRYPT_H=1
endif
diff -ur ppp-2.4.1.orig/pppd/auth.c ppp-2.4.1/pppd/auth.c
--- ppp-2.4.1.orig/pppd/auth.c Mon Mar 12 21:54:33 2001
+++ ppp-2.4.1/pppd/auth.c Mon Jul 9 14:00:06 2001
@@ -46,7 +46,7 @@
#include <sys/socket.h>
#include <utmp.h>
#include <fcntl.h>
-#if defined(_PATH_LASTLOG) && defined(_linux_)
+#if defined(_PATH_LASTLOG_FOO) && defined(_linux_)
#include <lastlog.h>
#endif
@@ -1185,7 +1185,7 @@
tty += 5;
logwtmp(tty, user, remote_name); /* Add wtmp login entry */
-#if defined(_PATH_LASTLOG) && !defined(USE_PAM)
+#if defined(_PATH_LASTLOG_FOO) && !defined(USE_PAM)
if (pw != (struct passwd *)NULL) {
struct lastlog ll;
int fd;
diff -ur ppp-2.4.1.orig/pppd/sys-linux.c ppp-2.4.1/pppd/sys-linux.c
--- ppp-2.4.1.orig/pppd/sys-linux.c Mon Mar 12 21:54:41 2001
+++ ppp-2.4.1/pppd/sys-linux.c Mon Jul 9 14:00:10 2001
@@ -2030,7 +2030,7 @@
{
struct utmp ut, *utp;
pid_t mypid = getpid();
-#if __GLIBC__ < 2
+#if __GLIBC__ < 2 || defined __UCLIBC__
int wtmp;
#endif
@@ -2081,7 +2081,7 @@
/*
* Update the wtmp file.
*/
-#if __GLIBC__ >= 2
+#if __GLIBC__ >= 2 && ! defined __UCLIBC__
updwtmp(_PATH_WTMP, &ut);
#else
wtmp = open(_PATH_WTMP, O_APPEND|O_WRONLY);
diff -ur ppp-2.4.1.orig/pppdump/pppdump.c ppp-2.4.1/pppdump/pppdump.c
--- ppp-2.4.1.orig/pppdump/pppdump.c Mon Mar 12 21:56:34 2001
+++ ppp-2.4.1/pppdump/pppdump.c Mon Jul 9 14:00:26 2001
@@ -16,6 +16,7 @@
#include <stdio.h>
#include <unistd.h>
#include <time.h>
+#include <stdlib.h>
#include <sys/types.h>
#include "ppp_defs.h"
#include "ppp-comp.h"
More information about the uClibc
mailing list