diff options
| author | Álvaro Fernández Rojas | 2025-11-10 12:43:48 +0000 |
|---|---|---|
| committer | Álvaro Fernández Rojas | 2025-11-10 16:46:58 +0000 |
| commit | 2b26df1293c1209596fdb2327ca3393bc0d5fdd4 (patch) | |
| tree | fccc03274cddb8ff6ef76c3ed84822c3b16977a3 | |
| parent | 43baf47948c66586517548b4d0bc146ba64662fc (diff) | |
| download | odhcpd-2b26df1293c1209596fdb2327ca3393bc0d5fdd4.tar.gz | |
src: replace #pragma once with defines
Replace #pragma once with defines since it's not standard.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
| -rw-r--r-- | src/dhcpv4.h | 6 | ||||
| -rw-r--r-- | src/dhcpv6-pxe.h | 5 | ||||
| -rw-r--r-- | src/dhcpv6.h | 6 | ||||
| -rw-r--r-- | src/odhcpd.h | 6 | ||||
| -rw-r--r-- | src/router.h | 6 |
5 files changed, 24 insertions, 5 deletions
diff --git a/src/dhcpv4.h b/src/dhcpv4.h index 9b28059..6599acf 100644 --- a/src/dhcpv4.h +++ b/src/dhcpv4.h @@ -12,7 +12,9 @@ * GNU General Public License version 2 for more details. * */ -#pragma once + +#ifndef _DHCPV4_H_ +#define _DHCPV4_H_ #define DHCPV4_CLIENT_PORT 68 #define DHCPV4_SERVER_PORT 67 @@ -178,3 +180,5 @@ struct dhcpv4_dnr { &opt[1] <= (struct dhcpv4_option*)(end) && \ &opt->data[opt->len] <= (end); \ opt = (struct dhcpv4_option*)&opt->data[opt->len]) + +#endif /* _DHCPV4_H_ */ diff --git a/src/dhcpv6-pxe.h b/src/dhcpv6-pxe.h index 0e3c227..eedba0e 100644 --- a/src/dhcpv6-pxe.h +++ b/src/dhcpv6-pxe.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef _DHCPV6_PXE_H_ +#define _DHCPV6_PXE_H_ #include <unistd.h> #include <stddef.h> @@ -11,3 +12,5 @@ const struct ipv6_pxe_entry* ipv6_pxe_of_arch(uint16_t arch); void ipv6_pxe_serve_boot_url(uint16_t arch, struct iovec* iov); void ipv6_pxe_dump(void); void ipv6_pxe_clear(void); + +#endif /* _DHCPV6_PXE_H_ */ diff --git a/src/dhcpv6.h b/src/dhcpv6.h index 5c3986c..de0362f 100644 --- a/src/dhcpv6.h +++ b/src/dhcpv6.h @@ -11,7 +11,9 @@ * GNU General Public License version 2 for more details. * */ -#pragma once + +#ifndef _DHCPV6_H_ +#define _DHCPV6_H_ #include "odhcpd.h" @@ -168,3 +170,5 @@ struct dhcpv6_cer_id { ((otype) = _o[0] << 8 | _o[1]) && ((odata) = (void*)&_o[4]) &&\ ((olen) = _o[2] << 8 | _o[3]) + (odata) <= (end); \ _o += 4 + (_o[2] << 8 | _o[3])) + +#endif /* _DHCPV6_H_ */ diff --git a/src/odhcpd.h b/src/odhcpd.h index 6cae39d..e8cb6dd 100644 --- a/src/odhcpd.h +++ b/src/odhcpd.h @@ -12,7 +12,9 @@ * */ -#pragma once +#ifndef _ODHCPD_H_ +#define _ODHCPD_H_ + #include <netinet/in.h> #include <netinet/icmp6.h> #include <netinet/ether.h> @@ -626,3 +628,5 @@ int ndp_setup_interface(struct interface *iface, bool enable); void reload_services(struct interface *iface); void odhcpd_reload(void); + +#endif /* _ODHCPD_H_ */ diff --git a/src/router.h b/src/router.h index 9b028d1..5502a0d 100644 --- a/src/router.h +++ b/src/router.h @@ -12,7 +12,9 @@ * */ -#pragma once +#ifndef _ROUTER_H_ +#define _ROUTER_H_ + #include <stdint.h> #include <netinet/in.h> #include <netinet/icmp6.h> @@ -98,3 +100,5 @@ struct icmpv6_opt { * use this until it is defined in netinet/icmp6.h */ #define ND_OPT_PI_FLAG_PD_PREFERRED 0x10 + +#endif /* _ROUTER_H_ */ |