Package: ramond
Followup-For: Bug #1066551
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch
Control: tags -1 patch

Please find attached a patch for this issue which has been uploaded to
Ubuntu.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru ramond-0.5/debian/patches/0001-Daemonize-ramond-by-default.patch 
ramond-0.5/debian/patches/0001-Daemonize-ramond-by-default.patch
--- ramond-0.5/debian/patches/0001-Daemonize-ramond-by-default.patch    
2020-09-09 13:09:14.000000000 -0700
+++ ramond-0.5/debian/patches/0001-Daemonize-ramond-by-default.patch    
2024-04-13 09:50:06.000000000 -0700
@@ -8,10 +8,10 @@
  src/main.h |    1 +
  2 files changed, 80 insertions(+), 2 deletions(-)
 
-diff --git a/src/main.c b/src/main.c
-index 0cb6e8a..3c4543d 100644
---- a/src/main.c
-+++ b/src/main.c
+Index: ramond-0.5/src/main.c
+===================================================================
+--- ramond-0.5.orig/src/main.c
++++ ramond-0.5/src/main.c
 @@ -1,6 +1,5 @@
  #include "main.h"
  #include "log.h"
@@ -19,7 +19,7 @@
  apr_pool_t *masterPool;
  struct configuration *config;
  
-@@ -14,8 +13,9 @@ void listRules(void);
+@@ -14,8 +13,9 @@
  
  void usage(char *prog_name)
  {
@@ -30,7 +30,7 @@
        fprintf(stderr, "       -c : path to config file.\n");
  }
  
-@@ -824,11 +824,74 @@ void rafixd_clearRoute(struct ra_info *data)
+@@ -824,11 +824,74 @@
        pcap_close(fd);
  }
  
@@ -81,7 +81,7 @@
 +      pidfile = open("/var/run/ramond.pid", O_RDWR|O_CREAT, 0640);
 +      if(pidfile < 0)
 +              exit(EXIT_FAILURE);
-+      if(flock(pidfile, F_TLOCK, 0) < 0)
++      if(lockf(pidfile, F_TLOCK, 0) < 0)
 +              exit(EXIT_SUCCESS);
 +
 +      sprintf(pidstr, "%d\n", getpid());
@@ -105,7 +105,7 @@
        if(argc > 6)
        {
                usage(argv[0]);
-@@ -842,6 +905,20 @@ int main(int argc, char *argv[])
+@@ -842,6 +905,20 @@
  
        signal(SIGCHLD, sigchld_handler);
  
@@ -126,10 +126,10 @@
        /* Find the config file */
        if(!parseConfigFile(argc,argv))
        {
-diff --git a/src/main.h b/src/main.h
-index 26de811..6552d5b 100644
---- a/src/main.h
-+++ b/src/main.h
+Index: ramond-0.5/src/main.h
+===================================================================
+--- ramond-0.5.orig/src/main.h
++++ ramond-0.5/src/main.h
 @@ -1,5 +1,6 @@
  #include <stdlib.h>
  #include <stdio.h>
diff -Nru ramond-0.5/debian/patches/no-implicit-declarations.patch 
ramond-0.5/debian/patches/no-implicit-declarations.patch
--- ramond-0.5/debian/patches/no-implicit-declarations.patch    1969-12-31 
16:00:00.000000000 -0800
+++ ramond-0.5/debian/patches/no-implicit-declarations.patch    2024-04-13 
09:50:06.000000000 -0700
@@ -0,0 +1,29 @@
+Description: fix missing function declarations.
+Author: Steve Langasek <steve.langa...@canonical.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/2061024
+Bug-Debian: https://bugs.debian.org/1066551
+Last-Update: 2024-04-13
+Forwarded: no
+
+Index: ramond-0.5/src/log.h
+===================================================================
+--- ramond-0.5.orig/src/log.h
++++ ramond-0.5/src/log.h
+@@ -25,4 +25,6 @@
+ 
+ FILE *log_file;
+ 
++void LOG(const char *fmt, ...);
++
+ #endif
+Index: ramond-0.5/src/main.c
+===================================================================
+--- ramond-0.5.orig/src/main.c
++++ ramond-0.5/src/main.c
+@@ -1,3 +1,6 @@
++#include <stdlib.h>
++#include <sys/stat.h>
++
+ #include "main.h"
+ #include "log.h"
+ apr_pool_t *masterPool;
diff -Nru ramond-0.5/debian/patches/series ramond-0.5/debian/patches/series
--- ramond-0.5/debian/patches/series    2022-04-20 16:48:49.000000000 -0700
+++ ramond-0.5/debian/patches/series    2024-04-13 09:48:15.000000000 -0700
@@ -4,3 +4,4 @@
 0004-Honor-CFLAGS-CPPFLAGS-and-LDFLAGS.patch
 compiler.patch
 libxml2.patch
+no-implicit-declarations.patch

Reply via email to