Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ppp-2.5.0 support? #19

Open
Pro-pra opened this issue Jan 19, 2024 · 6 comments
Open

ppp-2.5.0 support? #19

Pro-pra opened this issue Jan 19, 2024 · 6 comments

Comments

@Pro-pra
Copy link

Pro-pra commented Jan 19, 2024

ppp-2.5.0 now not have pppd/patchlevel.h

@Neustradamus
Copy link

For information, PPP 2.5.2 has been released (2024-12-31):

@InterLinked1
Copy link
Contributor

ppp-2.5.0 now not have pppd/patchlevel.h

Since it sounds like you use the ppp functionality, for those of us less familiar with the ppp project, do you have a suggested fix or knowledge of what should be used instead of patchlevel.h?

Obviously, the code in configure.ac that looks for that file could be removed, but I imagine it should probably be looking for something else instead.

@Pro-pra
Copy link
Author

Pro-pra commented Jan 12, 2025

My attempt patch for ppp-2.5.0

diff -ruN a/configure b/configure
--- a/configure	2025-01-12 12:09:26.719518784 +0900
+++ b/configure	2025-01-12 12:13:23.456540826 +0900
@@ -21030,7 +21030,7 @@
 	*) ppp_path="$with_ppp" ;;
 esac
 
-level_file="$ppp_path/include/pppd/patchlevel.h"
+level_file="$ppp_path/include/pppd/pppdconf.h"
 PPP_VERSION=
 if test "$ppp_path" != '' && test -r "$level_file"; then
 	PPPD_VERSION=`awk -F '"' '/VERSION/ { print $$2; }' $level_file`
@@ -21042,7 +21042,7 @@
 	# If we asked explicitly for ppp support
 	if test "$PPPD_VERSION" = ''; then
 		# but have not detected it
-		as_fn_error $? "failed to find pppd/patchlevel.h: no ppp support." "$LINENO" 5
+		as_fn_error $? "failed to find pppd/pppdconf.h: no ppp support." "$LINENO" 5
 	fi
 	;;
 esac
diff -ruN a/configure.ac b/configure.ac
--- a/configure.ac	2025-01-12 12:09:24.036382529 +0900
+++ b/configure.ac	2025-01-12 12:13:46.962734523 +0900
@@ -333,7 +333,7 @@
 	*) ppp_path="$with_ppp" ;;
 esac
 
-level_file="$ppp_path/include/pppd/patchlevel.h"
+level_file="$ppp_path/include/pppd/pppdconf.h"
 PPP_VERSION=
 if test "$ppp_path" != '' && test -r "$level_file"; then
 	PPPD_VERSION=`awk -F '"' '/VERSION/ { print $$2; }' $level_file`
@@ -345,7 +345,7 @@
 	# If we asked explicitly for ppp support
 	if test "$PPPD_VERSION" = ''; then
 		# but have not detected it
-		AC_MSG_ERROR(failed to find pppd/patchlevel.h: no ppp support.)
+		AC_MSG_ERROR(failed to find pppd/pppdconf.h: no ppp support.)
 	fi
 	;;
 esac
diff -ruN a/ppp/dahdi.c b/ppp/dahdi.c
--- a/ppp/dahdi.c	2016-03-02 07:04:19.000000000 +0900
+++ b/ppp/dahdi.c	2025-01-12 12:27:49.534472066 +0900
@@ -41,13 +41,15 @@
 #include <pppd/lcp.h>
 #include <pppd/ipcp.h>
 #include <pppd/ccp.h>
-#include <pppd/pathnames.h>
+#include <pppd/pppdconf.h>
+#include <pppd/options.h>
+#include <pppd/pppd.h>
 
 #include <dahdi/user.h>
 
 extern int new_style_driver;
 
-const char pppd_version[] = VERSION;
+const char pppd_version[] = PPPD_VERSION;
 
 #define _PATH_DAHDI_OPT         _ROOT_PATH "/etc/ppp/options."
 
@@ -166,7 +168,7 @@
     int ret;
     char buf[256];
     snprintf(buf, 256, _PATH_DAHDI_OPT "%s",devnam);
-    if(!options_from_file(buf, 0, 0, 1))
+    if(!ppp_options_from_file(buf, 0, 0, 1))
 	exit(EXIT_OPTION_ERROR);
 
 }

@Pro-pra
Copy link
Author

Pro-pra commented Jan 12, 2025

patch need more work, some functions renamed or removed :(

@Neustradamus
Copy link

Thanks @Pro-pra!

Can you check for PPP 2.5.2?

@Pro-pra
Copy link
Author

Pro-pra commented Jan 12, 2025

My patch not work! i'm maintainer, not programmer, need more changes in patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants