File: 01_APR_FTBS.patch

package info (click to toggle)
libapache2-mod-lisp 1.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 200 kB
  • sloc: ansic: 2,085; makefile: 24; sh: 21
file content (67 lines) | stat: -rw-r--r-- 2,219 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Description: Remove bogus test on APR version
Author: Antonio Radici <antonio@dyne.org>
Last-Update: 2023-01-05

Index: libapache2-mod-lisp/mod_lisp.c
===================================================================
--- libapache2-mod-lisp.orig/mod_lisp.c
+++ libapache2-mod-lisp/mod_lisp.c
@@ -154,12 +154,6 @@ University of Illinois, Urbana-Champaign
 #include <string.h>
 
 module AP_MODULE_DECLARE_DATA lisp_module;
-/* Work out the version of the apache portable runtime (APR) we're
- * compiling against... with version 1.2.2 some of the interfaces
- * changed a bit. */
-#if (APR_MAJOR_VERSION==1 && APR_MINOR_VERSION==2 && APR_PATCH_VERSION>=2)
-#define HAVE_APR_1_2_2    1
-#endif
 
 
 #define RELAY_ERROR(expr) do						\
@@ -382,17 +376,9 @@ open_lisp_socket (lisp_cfg_t * cfg)
     (apr_sockaddr_info_get ((&addr), (cfg->server_address), APR_UNSPEC,
                             (cfg->server_port), 0, socket_pool));
 
-#if (HAVE_APR_1_2_2)
   RELAY_ERROR (apr_socket_create ((&socket), AF_INET, SOCK_STREAM, APR_PROTO_TCP, socket_pool));
-#else
-  RELAY_ERROR (apr_socket_create ((&socket), AF_INET, SOCK_STREAM, socket_pool));
-#endif
   
-#if (HAVE_APR_1_2_2)
   RELAY_ERROR (apr_socket_connect (socket, addr));
-#else
-  RELAY_ERROR (apr_connect (socket, addr));
-#endif
   {
     input_buffer_t * buffer
       = (apr_palloc (socket_pool, (sizeof (input_buffer_t))));
@@ -425,11 +411,7 @@ write_lisp_data (apr_socket_t * socket,
   while (1)
     {
       apr_size_t n2 = n1;
-#if (HAVE_APR_1_2_2)
       RELAY_ERROR (apr_socket_send (socket, p, (&n2)));
-#else
-      RELAY_ERROR (apr_send (socket, p, &n2));
-#endif
       if (n2 == n1)
 	return (APR_SUCCESS);
       p += n2;
@@ -487,15 +469,9 @@ fill_input_buffer (apr_socket_t * socket
   apr_size_t length;
 
   RELAY_ERROR (get_input_buffer (socket, (&buffer)));
-#if (HAVE_APR_1_2_2)
   RELAY_ERROR
     (((length = (sizeof (buffer->data))),
       (apr_socket_recv (socket, (buffer->data), (&length)))));
-#else
-   RELAY_ERROR
-     (((length = (sizeof (buffer->data))),
-       (apr_recv (socket, (buffer->data), (&length)))));
-#endif
   (buffer->start) = (buffer->data);
   (buffer->end) = ((buffer->data) + length);
   if (length == 0)