Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

From Albert Chin: just define __attribute__ as an empty macro if we

don't have __attribute__ support in the compiler.

While we're at it, get rid of the declaration of bpf_error() in
gencode.c, as it's already declared in gencode.h.
  • Loading branch information...
commit 022b629ab1206fe584c74f1bae930774642be62c 1 parent 4eb7b39
yuguy yuguy authored
Showing with 7 additions and 8 deletions.
  1. +1 −3 gencode.c
  2. +6 −5 gencode.h
4 gencode.c
View
@@ -21,7 +21,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.232 2005-04-20 18:23:09 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.233 2005-04-23 22:26:51 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -108,8 +108,6 @@ static u_int orig_linktype = -1U, orig_nl = -1U;
static int pcap_fddipad;
#endif
-void bpf_error(const char *fmt, ...) __attribute__((noreturn));
-
/* VARARGS */
void
bpf_error(const char *fmt, ...)
11 gencode.h
View
@@ -18,7 +18,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.61 2005-04-19 04:25:00 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.62 2005-04-23 22:26:52 guy Exp $ (LBL)
*/
/*
@@ -55,6 +55,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#ifndef HAVE___ATTRIBUTE__
+#define __attribute__(x)
+#endif /* HAVE___ATTRIBUTE__ */
+
/* Address qualifiers. */
#define Q_HOST 1
@@ -290,10 +294,7 @@ struct block *gen_pf_dir(int);
void bpf_optimize(struct block **);
void bpf_error(const char *, ...)
-#if HAVE___ATTRIBUTE__
- __attribute__((noreturn, format (printf, 1, 2)))
-#endif
-;
+ __attribute__((noreturn, format (printf, 1, 2)));
void finish_parse(struct block *);
char *sdup(const char *);
Please sign in to comment.
Something went wrong with that request. Please try again.