From 22239dbcf3eb475d6dd2055d3e9d951806436923 Mon Sep 17 00:00:00 2001 From: Michael Schloh von Bennewitz Date: Fri, 26 Sep 2003 15:01:06 +0000 Subject: [PATCH] Whoops missed a AF_LOCAL so fix it, and also clean up our custom cdefs header --- honeyd/cdefs.h | 86 ++++++++++++++++++--------------------------- honeyd/honeyd.patch | 9 +++++ honeyd/honeyd.spec | 2 +- 3 files changed, 44 insertions(+), 53 deletions(-) diff --git a/honeyd/cdefs.h b/honeyd/cdefs.h index 1957f175fc..1080d45e6a 100644 --- a/honeyd/cdefs.h +++ b/honeyd/cdefs.h @@ -25,57 +25,40 @@ */ /* -** libsm C language portability macros -** See libsm/cdefs.html for documentation. +** BSD and Linux already have which defines a set of C +** language portability macros that are a defacto standard in the open +** source community. This file allows for building on platforms lacking +** these definitions. */ - #ifndef HOND_CDEFS_H # define HOND_CDEFS_H -/* -** BSD and Linux have which defines a set of C language -** portability macros that are a defacto standard in the open source -** community. -*/ - -# if HOND_CONF_SYS_CDEFS_H -# include -# endif /* HOND_CONF_SYS_CDEFS_H */ - -/* -** Define the standard C language portability macros -** for platforms that lack . -*/ - -# if !HOND_CONF_SYS_CDEFS_H -# if defined(__cplusplus) -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS }; -# else /* defined(__cplusplus) */ -# define __BEGIN_DECLS -# define __END_DECLS -# endif /* defined(__cplusplus) */ -# if defined(__STDC__) || defined(__cplusplus) -# ifndef __P -# define __P(protos) protos -# endif /* __P */ -# define __CONCAT(x,y) x ## y -# define __STRING(x) #x -# else /* defined(__STDC__) || defined(__cplusplus) */ -# define __P(protos) () -# define __CONCAT(x,y) x/**/y -# define __STRING(x) "x" -# define const -# define signed -# define volatile -# endif /* defined(__STDC__) || defined(__cplusplus) */ -# endif /* !HOND_CONF_SYS_CDEFS_H */ +# if defined(__cplusplus) +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS }; +# else /* defined(__cplusplus) */ +# define __BEGIN_DECLS +# define __END_DECLS +# endif /* defined(__cplusplus) */ +# if defined(__STDC__) || defined(__cplusplus) +# ifndef __P +# define __P(protos) protos +# endif /* __P */ +# define __CONCAT(x,y) x ## y +# define __STRING(x) #x +# else /* defined(__STDC__) || defined(__cplusplus) */ +# define __P(protos) () +# define __CONCAT(x,y) x/**/y +# define __STRING(x) "x" +# define const +# define signed +# define volatile +# endif /* defined(__STDC__) || defined(__cplusplus) */ /* ** Define HOND_DEAD, a macro used to declare functions that do not return ** to their caller. */ - # ifndef HOND_DEAD # if __GNUC__ >= 2 # if __GNUC__ == 2 && __GNUC_MINOR__ < 5 @@ -91,7 +74,6 @@ /* ** Define HOND_UNUSED, a macro used to declare variables that may be unused. */ - # ifndef HOND_UNUSED # if __GNUC__ >= 2 # if __GNUC__ == 2 && __GNUC_MINOR__ < 7 @@ -113,13 +95,13 @@ ** using the "volatile" keyword. If a variable actually is volatile, ** then HOND_NONVOLATILE should not be used. ** -** To compile sendmail with gcc and see all non-bogus warnings, -** you should use -** gcc -O -Wall -DHOND_OMIT_BOGUS_WARNINGS ... -** Do not use -DHOND_OMIT_BOGUS_WARNINGS when compiling the production -** version of sendmail, because there is a performance hit. +** To compile source code with gcc and see all non-bogus warnings use: +** +** gcc -O -Wall -DHOND_OMIT_BOGUS_WARNINGS ... +** +** Do not use -DHOND_OMIT_BOGUS_WARNINGS when compiling production +** software, because there is a performance hit. */ - # ifdef HOND_OMIT_BOGUS_WARNINGS # define HOND_NONVOLATILE volatile # else /* HOND_OMIT_BOGUS_WARNINGS */ @@ -129,12 +111,11 @@ /* ** Turn on format string argument checking. */ - # ifndef HOND_CONF_FORMAT_TEST # if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 -# define HOND_CONF_FORMAT_TEST 1 +# define HOND_CONF_FORMAT_TEST 1 # else /* __GNUC__ == 2 && __GNUC_MINOR__ >= 7 */ -# define HOND_CONF_FORMAT_TEST 0 +# define HOND_CONF_FORMAT_TEST 0 # endif /* __GNUC__ == 2 && __GNUC_MINOR__ >= 7 */ # endif /* HOND_CONF_FORMAT_TEST */ @@ -155,3 +136,4 @@ # endif /* ! SCANFLIKE */ #endif /* ! HOND_CDEFS_H */ + diff --git a/honeyd/honeyd.patch b/honeyd/honeyd.patch index 64adfe090f..c131018863 100644 --- a/honeyd/honeyd.patch +++ b/honeyd/honeyd.patch @@ -10,6 +10,15 @@ diff -Naur honeyd-0.6a.orig/honeyd_overload.c honeyd-0.6a/honeyd_overload.c warn("%s: socketpair", __func__); return (NULL); } +@@ -500,7 +500,7 @@ + } + + /* Get another socketpair */ +- if (socketpair(AF_LOCAL, SOCK_STREAM, 0, pair) == -1) { ++ if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) { + DPRINTF((stderr, "%s: socketpair failed", __func__)); + errno = ETIMEDOUT; /* XXX */ + return (-1); @@ -607,6 +607,7 @@ } #endif /* !__FreeBSD__ */ diff --git a/honeyd/honeyd.spec b/honeyd/honeyd.spec index 99f296bf97..27481a8264 100644 --- a/honeyd/honeyd.spec +++ b/honeyd/honeyd.spec @@ -33,7 +33,7 @@ Distribution: OpenPKG [EVAL] Group: Security License: BSD Version: 0.6a -Release: 20030925 +Release: 20030926 # package options %option with_fsl yes