]> git.ozlabs.org Git - ppp.git/commit
Move inclusion of <linux/ppp_ioctl.h> to allow geriatric systems to build ppp. (...
authorNeal P. Murphy <imnozi@gmail.com>
Thu, 13 Mar 2025 01:41:09 +0000 (21:41 -0400)
committerGitHub <noreply@github.com>
Thu, 13 Mar 2025 01:41:09 +0000 (12:41 +1100)
commitb514c2c6e33716ca38b6c191f4bd295528eaf571
treeac4ef12c7e27f4d3b86edfb9c5b5baa3f14a2644
parent05361692ee7d6260ce5c04c9fa0e5a1aa7565323
Move inclusion of <linux/ppp_ioctl.h> to allow geriatric systems to build ppp. (#552)

Given a system with the following:
  - linux 4.4.302
  - kernel headers 3.4.104
  - gcc 4.7.3
  - binutils 2.22
  - glibc 2.18

Compiling ppp fails with the following errors:

====
x86_64-linux-gnu-gcc -std=gnu11 -DHAVE_CONFIG_H -I. -I../pppd/plugins/pppoe  -DSYSCONFDIR=\"/usr/etc\" -DPPPD_RUNTIME_DIR='"/usr/var/run/pppd"' -DPPPD_LOGFILE_DIR='"/usr/var/log/ppp"' -DSYSTEM_CA_PATH='"/usr/etc/ssl/certs"'   -DPPPD_PLUGIN_DIR='"/usr/lib/pppd/2.5.2"'       -O2 -m64 -fPIC -MT pppd-sys-linux.o -MD -MP -MF .deps/pppd-sys-linux.Tpo -c -o pppd-sys-linux.o `test -f 'sys-linux.c' || echo './'`sys-linux.c
In file included from sys-linux.c:125:0:
/usr/include/linux/ppp-ioctl.h:55:14: error: field 'mode' has incomplete type
make[3]: *** [Makefile:1334: pppd-sys-linux.o] Error 1
make[3]: Leaving directory '/build/sources/ppp/ppp-2.5.2/pppd'
make[2]: *** [Makefile:819: all] Error 2
make[2]: Leaving directory '/build/sources/ppp/ppp-2.5.2/pppd'
make[1]: *** [Makefile:505: all-recursive] Error 1
make[1]: Leaving directory '/build/sources/ppp/ppp-2.5.2'
make: *** [Makefile:31: compile] Error 2
make: Leaving directory '/build/sources/ppp'
====

and

====
libtool: compile:  x86_64-linux-gnu-gcc -std=gnu11 -DHAVE_CONFIG_H -I. -I../../../pppd -I../../../pppd/plugins/pppoe -I../../.. -O2 -m64 -fPIC -MT pppol2tp_la-pppol2tp.lo -MD -MP -MF .deps/pppol2tp_la-pppol2tp.Tpo -c pppol2tp.c  -fPIC -DPIC -o .libs/pppol2tp_la-pppol2tp.o
In file included from pppol2tp.c:41:0:
/usr/include/linux/ppp-ioctl.h:55:14: error: field 'mode' has incomplete type
make[3]: *** [Makefile:498: pppol2tp_la-pppol2tp.lo] Error 1
make[3]: Leaving directory '/build/sources/ppp/ppp-2.5.2/pppd/plugins/pppol2tp'
make[2]: *** [Makefile:579: all-recursive] Error 1
make[2]: Leaving directory '/build/sources/ppp/ppp-2.5.2/pppd/plugins'
make[1]: *** [Makefile:505: all-recursive] Error 1
make[1]: Leaving directory '/build/sources/ppp/ppp-2.5.2'
make: *** [Makefile:31: compile] Error 2
make: Leaving directory '/build/sources/ppp'
====

They are likely due to the ordering of include files which changed in newer
systems.

Signed-off-by: NPMurphy <neal.p.murphy@alum.wpi.edu>
Co-authored-by: NPMurphy <neal.p.murphy@alum.wpi.edu>
pppd/plugins/pppol2tp/pppol2tp.c
pppd/sys-linux.c