Skip to content

Commit

Permalink
Systems like NetBSD need sys/types.h included before net/if.h
Browse files Browse the repository at this point in the history
The AC_HEADER_STDC macro checks for sys/types.h for us already.

Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed Jul 31, 2024
1 parent a241e45 commit 8ea9a51
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/netcalc.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@
#ifndef NETCALC_H_
#define NETCALC_H_

#include <config.h>
#include "config.h"

#include <stdint.h>
#include <err.h> /* warnx() et al */
#ifdef __APPLE__
#include <sys/socket.h> /* Has to be included before net/if.h */
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h> /* u_long on NetBSD */
#endif
#include <net/if.h> /* IFNAMSIZ */

#define V4ADDR_VAL "0123456789."
Expand Down

0 comments on commit 8ea9a51

Please sign in to comment.