]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
LZO: do not use lzoutils.h macros
authorFrank Lichtenheld <frank@lichtenheld.com>
Tue, 4 Jun 2024 21:17:08 +0000 (23:17 +0200)
committerGert Doering <gert@greenie.muc.de>
Wed, 5 Jun 2024 10:37:22 +0000 (12:37 +0200)
Instead of lzo_{free,malloc} we can just use the
free and malloc as the lzoutils.h header itself
suggests.

Change-Id: I32ee28fde5d38d736f753c782d88a81de7fe2980
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Message-Id: <20240604211708.32315-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28705.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
config.h.cmake.in
configure.ac
src/openvpn/lzo.c
src/openvpn/lzo.h

index 2cdfdcc3a702e6228a91186e41e287b178915fcf..effca2a5c80d764c9fdd9fb564f38435ca4b6b37 100644 (file)
@@ -184,9 +184,6 @@ don't. */
 /* Define to 1 if you have the <lzo1x.h> header file. */
 #define HAVE_LZO1X_H 1
 
-/* Define to 1 if you have the <lzoutil.h> header file. */
-#define HAVE_LZOUTIL_H 1
-
 /* Define to 1 if you have the `mlockall' function. */
 #cmakedefine HAVE_MLOCKALL
 
index 965ed1a38ecbbe82ed95acb3969d6ce12b7fa41e..2e5ab6a65eb25f79198bc4597fc33bbd0fd4e111 100644 (file)
@@ -1160,15 +1160,6 @@ fi
 if test "${have_lzo}" = "yes"; then
        saved_CFLAGS="${CFLAGS}"
        CFLAGS="${CFLAGS} ${LZO_CFLAGS}"
-       AC_CHECK_HEADERS(
-               [lzo/lzoutil.h],
-               ,
-               [AC_CHECK_HEADERS(
-                       [lzoutil.h],
-                       ,
-                       [AC_MSG_ERROR([lzoutil.h is missing])]
-               )]
-       )
        AC_CHECK_HEADERS(
                [lzo/lzo1x.h],
                ,
index b313284df756d5e3874cb09d109954fa6d328173..bab2d7828cff7db0516960899ececef5466c7a23 100644 (file)
@@ -107,14 +107,14 @@ lzo_compress_init(struct compress_context *compctx)
     {
         msg(M_FATAL, "Cannot initialize LZO compression library (lzo_init() returns %d)", lzo_status);
     }
-    compctx->wu.lzo.wmem = (lzo_voidp) lzo_malloc(compctx->wu.lzo.wmem_size);
+    compctx->wu.lzo.wmem = (lzo_voidp) malloc(compctx->wu.lzo.wmem_size);
     check_malloc_return(compctx->wu.lzo.wmem);
 }
 
 static void
 lzo_compress_uninit(struct compress_context *compctx)
 {
-    lzo_free(compctx->wu.lzo.wmem);
+    free(compctx->wu.lzo.wmem);
     compctx->wu.lzo.wmem = NULL;
 }
 
index e951b49bbdf2e26b7bcd5fe08854dccd0783eb57..62d73a1b36b2f70f19cd333dbf226880cd82c94a 100644 (file)
 #if defined(HAVE_LZO_CONF_H)
 /* The lzo.h magic gets confused and still wants
  * to include lzo/lzoconf.h even if our include paths
- * are setup to include the paths without lzo/ include lzoconf.h to
- * avoid it being include by lzoutil.h */
+ * are setup to include the paths without lzo/
+ */
 #include <lzodefs.h>
 #include <lzoconf.h>
 #endif
-#if defined(HAVE_LZO_LZOUTIL_H)
-#include <lzo/lzoutil.h>
-#elif defined(HAVE_LZOUTIL_H)
-#include <lzoutil.h>
-#endif
 #if defined(HAVE_LZO_LZO1X_H)
 #include <lzo/lzo1x.h>
 #elif defined(HAVE_LZO1X_H)