Package: dante
Version:  1.4.2+dfsg-7
Tags: + patch

The /usr/include/socks.h file installed by libsocksd0-dev is missing precompiler wrappers to protect against include loops. It is good practice with modern software to provide these wrappers in library headers files and avoid mistakes with third-party attempts to provide their own.
Description: Missing C API protections
 The installed socks.h header lacks protection for C API
 being built by C++ compilers when included into C++ code.
 As well as missing protection against circular/repeated
 includes.
Author: Amos Jeffries <amosjeffr...@squid-cache.org>
Last-Update: 2021-12-30
---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

--- dante-1.4.2+dfsg.orig/capi/socks.h.in
+++ dante-1.4.2+dfsg/capi/socks.h.in
@@ -43,6 +43,9 @@
 
 /* $Id: socks.h.in,v 1.22 2009/12/19 14:14:28 karls Exp $ */
 
+#ifndef __DANTE__SOCKS_H_
+#define __DANTE__SOCKS_H_
+
 #include <sys/types.h>
 #include <sys/socket.h>
 
@@ -80,6 +83,10 @@
 #define write Rwrite
 #define writev Rwritev
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int
 SOCKSinit(char *progname);
 /*
@@ -119,3 +126,9 @@
 
 int Rlisten(int, int);
 int Rselect(int, fd_set *, fd_set *, fd_set *, struct timeval *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DANTE__SOCKS_H_ */

Reply via email to