My build was working fine in xcode 15.4, after updating to 16.0, this problem is occurring.
Could not find any reference for DarwinFoundation anywhere, any help or suggestion is welcome.
~/Sources/WireGuardKitC/WireGuardKitC.h:10:5 Declaration of ‘u_int32_t’ must be imported from module ‘DarwinFoundation.unsigned_types.u_int32_t’ before it is required
~/Sources/WireGuardKitC/WireGuardKitC.h:14:5 Declaration of ‘u_char’ must be imported from module ‘DarwinFoundation.unsigned_types.u_char’ before it is required
~/Sources/WireGuardKitC/WireGuardKitC.h:16:5 Declaration of ‘u_int16_t’ must be imported from module ‘DarwinFoundation.unsigned_types.u_int16_t’ before it is required
/// WireGuardKitC.h source ///
#include "key.h"
#include "x25519.h"
/* From <sys/kern_control.h> */
#define CTLIOCGINFO 0xc0644e03UL
struct ctl_info {
u_int32_t ctl_id;
char ctl_name[96];
};
struct sockaddr_ctl {
u_char sc_len;
u_char sc_family;
u_int16_t ss_sysaddr;
u_int32_t sc_id;
u_int32_t sc_unit;
u_int32_t sc_reserved[5];
};
problem was occurring in iOS projects for Wireguard implementation.
It was working fine in Xcode 15.4, stopped working in 16.0.
2
Answers
If anybody is still wandering, just adding
at top will fix the issue.
Having the same issue I made the change to this
hope that help you or at least the next person who gets here