src: replace #pragma once with defines
authorÁlvaro Fernández Rojas <[email protected]>
Mon, 10 Nov 2025 12:43:48 +0000 (13:43 +0100)
committerÁlvaro Fernández Rojas <[email protected]>
Mon, 10 Nov 2025 16:46:58 +0000 (17:46 +0100)
Replace #pragma once with defines since it's not standard.

Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/dhcpv4.h
src/dhcpv6-pxe.h
src/dhcpv6.h
src/odhcpd.h
src/router.h

index 9b28059255f143f995203dad6039657b3ba2db65..6599acf67b6c0b6c6017b689da61dcfc53b3bdb9 100644 (file)
@@ -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_ */
index 0e3c227c18935c849569a7c04add7bd14ac3a814..eedba0eef18d5e42c97b54d72ae1cea977dcf870 100644 (file)
@@ -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_ */
index 5c3986cf5793fc5d64dad57d24c7193a324ec521..de0362f63bc8510468be52ef47c633368688191b 100644 (file)
@@ -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_ */
index 6cae39dfce0118a306ab6945c62c9b682f7c815f..e8cb6ddf30b69e2f141c5e020aca96c54ebd7ba0 100644 (file)
@@ -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_ */
index 9b028d1a0b61c33ce7f148dbf13139e78503d9cd..5502a0d56042e56bc13ee2c5d5827f3e14b4b555 100644 (file)
@@ -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_ */