summaryrefslogtreecommitdiff
path: root/includes/osdep.h
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>1996-05-16 07:23:04 +0000
committerTed Lemon <source@isc.org>1996-05-16 07:23:04 +0000
commit10e99bf10e53b4f5c3210146097a57fb1c3ef94e (patch)
treea29a8cda8230377af646a4bfcb655aebd25646ba /includes/osdep.h
parent0ef9f561ae742714d97c296850ff24fce14e5244 (diff)
downloadisc-dhcp-10e99bf10e53b4f5c3210146097a57fb1c3ef94e.tar.gz
Add struct-vs-array compatibility macros for jmp_buf and ether_[sd]host
Diffstat (limited to 'includes/osdep.h')
-rw-r--r--includes/osdep.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/includes/osdep.h b/includes/osdep.h
index be4bcf0c..77898cdc 100644
--- a/includes/osdep.h
+++ b/includes/osdep.h
@@ -102,3 +102,25 @@
# define USE_NIT_SEND
# define USE_NIT_RECEIVE
#endif
+
+/* jmp_buf is assumed to be a struct unless otherwise defined in the
+ system header. */
+#ifndef jbp_decl
+# define jbp_decl(x) jmp_buf *x
+#endif
+#ifndef jref
+# define jref(x) (&(x))
+#endif
+#ifndef jdref
+# define jdref(x) (*(x))
+#endif
+
+/* On some systems, the struct ether_header source and destinations buffers
+ are arrays; on others, they are structs. We assume they're arrays
+ unless otherwise defined in the system header. */
+#ifndef ETHER_SRC
+# define ETHER_SRC(x) ((x) -> ether_shost)
+#endif
+#ifndef ETHER_DEST
+# define ETHER_DEST(x) ((x) -> ether_dhost)
+#endif