Created attachment 17134 [details]
patch to fix header inclusion
In a build environment that provides CPPFLAGS to point to the install location of samba, those flags get prepended to compiler calls before the paths to the local codebase. While it might be an idea to change that, another way to deal with this is to change source3/utils/net_offlinejoin.c not to simply include <netapi.h>, but "lib/netapi/netapi.h" and "lib/netapi/netapi_net.h" to refer to the current headers in the source tree and not those from an old install of samba that will trigger build failures.
Such failure occured to me while testing the build of samba in pkgsrc. It picks up the netapi.h from samba 4.13 and barks out. My patch aligns the header use with other files in utils.
I guess the attached patch is uncontroversial … it seems like an oversight that the <netapi.h> include was left there.