Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | From 7f8878ac1aaf4a19992d39379797c151301bedb1 Mon Sep 17 00:00:00 2001 |
| 2 | From: Oleksiy Obitotskyy <oobitots@cisco.com> |
| 3 | Date: Mon, 5 Feb 2018 08:29:10 -0800 |
| 4 | Subject: [PATCH] Fix build with clang |
| 5 | |
| 6 | Fix "error: non-void function 'fix_options' should return a value". |
| 7 | Add function prototype to tcpd.c and miscd.c. |
| 8 | |
| 9 | Upstream-Status: Pending |
| 10 | |
| 11 | Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> |
| 12 | --- |
| 13 | v2 - add function prototypes |
| 14 | |
| 15 | fix_options.c | 2 +- |
| 16 | miscd.c | 4 ++++ |
| 17 | tcpd.c | 4 ++++ |
| 18 | 3 files changed, 9 insertions(+), 1 deletion(-) |
| 19 | |
| 20 | diff --git a/fix_options.c b/fix_options.c |
| 21 | index b5e81b8..9958ff4 100644 |
| 22 | --- a/fix_options.c |
| 23 | +++ b/fix_options.c |
| 24 | @@ -29,7 +29,7 @@ static char sccsid[] = "@(#) fix_options.c 1.6 97/04/08 02:29:19"; |
| 25 | |
| 26 | /* fix_options - get rid of IP-level socket options */ |
| 27 | |
| 28 | -fix_options(request) |
| 29 | +void fix_options(request) |
| 30 | struct request_info *request; |
| 31 | { |
| 32 | #ifdef IP_OPTIONS |
| 33 | diff --git a/miscd.c b/miscd.c |
| 34 | index 1ab835c..723b83a 100644 |
| 35 | --- a/miscd.c |
| 36 | +++ b/miscd.c |
| 37 | @@ -40,6 +40,10 @@ static char sccsid[] = "@(#) miscd.c 1.10 96/02/11 17:01:30"; |
| 38 | #include "patchlevel.h" |
| 39 | #include "tcpd.h" |
| 40 | |
| 41 | +#ifdef KILL_IP_OPTIONS |
| 42 | +void fix_options(struct request_info *); |
| 43 | +#endif |
| 44 | + |
| 45 | int allow_severity = SEVERITY; /* run-time adjustable */ |
| 46 | int deny_severity = LOG_WARNING; /* ditto */ |
| 47 | |
| 48 | diff --git a/tcpd.c b/tcpd.c |
| 49 | index d865b9c..a179891 100644 |
| 50 | --- a/tcpd.c |
| 51 | +++ b/tcpd.c |
| 52 | @@ -38,6 +38,10 @@ static char sccsid[] = "@(#) tcpd.c 1.10 96/02/11 17:01:32"; |
| 53 | #include "patchlevel.h" |
| 54 | #include "tcpd.h" |
| 55 | |
| 56 | +#ifdef KILL_IP_OPTIONS |
| 57 | +void fix_options(struct request_info *); |
| 58 | +#endif |
| 59 | + |
| 60 | int allow_severity = SEVERITY; /* run-time adjustable */ |
| 61 | int deny_severity = LOG_WARNING; /* ditto */ |
| 62 | |
| 63 | -- |
| 64 | 2.10.3.dirty |
| 65 | |