Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37765397
en ru br
ALT Linux repos
S:1.10.0-alt2
5.0: 1.7.0-alt1
4.1: 1.7.2-alt0.M41.1
4.0: 1.7.2-alt0.M40.1
3.0: 1.6.0-alt1

Group :: Networking/Other
RPM: pptp-client

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: pptp-1.7.2-declaration.patch
Download


--- pptp-1.7.2/pptp.c	2008-05-14 07:33:55.000000000 +0100
+++ pptp-1.7.2/pptp.c	2008-05-14 16:30:01.000000000 +0100
@@ -61,9 +61,8 @@
 #include "version.h"
 #if defined(__linux__)
 #include <sys/prctl.h>
-#else
-#include "inststr.h"
 #endif
+#include "inststr.h"
 #include "util.h"
 #include "pptp_quirks.h"
 #include "pqueue.h"
@@ -183,6 +182,7 @@
     struct in_addr inetaddr;
     volatile int callmgr_sock = -1;
     char ttydev[PATH_MAX];
+    char *tty_name;
     int pty_fd, tty_fd, gre_fd, rc;
     volatile pid_t parent_pid, child_pid;
     u_int16_t call_id, peer_call_id;
@@ -391,7 +391,7 @@
         file2fd("/dev/null", "wb", STDERR_FILENO);
     }
 
-    char *tty_name = ttyname(tty_fd);
+    tty_name = ttyname(tty_fd);
     snprintf(buf, sizeof(buf), "pptp: GRE-to-PPP gateway on %s",
               tty_name ? tty_name : "(null)");
 #ifdef PR_SET_NAME
--- pptp-1.7.2/routing.c	2008-05-14 07:33:55.000000000 +0100
+++ pptp-1.7.2/routing.c	2008-05-14 16:36:26.000000000 +0100
@@ -55,8 +55,9 @@
 
 void routing_init(char *ip) {
   char buf[256];
+  FILE *p;
   snprintf(buf, 255, "/bin/ip route get %s", ip);
-  FILE *p = popen(buf, "r");
+  p = popen(buf, "r");
   fgets(buf, 255, p);
   /* TODO: check for failure of fgets */
   route = strdup(buf);
@@ -66,14 +67,16 @@
 
 void routing_start() {
   char buf[256];
+  FILE *p;
   snprintf(buf, 255, "/bin/ip route replace %s", route);
-  FILE *p = popen(buf, "r");
+  p = popen(buf, "r");
   pclose(p);
 }
 
 void routing_end() {
   char buf[256];
+  FILE *p;
   snprintf(buf, 255, "/bin/ip route delete %s", route);
-  FILE *p = popen(buf, "r");
+  p = popen(buf, "r");
   pclose(p);
 }
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin