net/if.h on HP/UX host hpisgr8

tridge at samba.org tridge at samba.org
Fri Oct 6 23:45:50 GMT 2006


Volker,

 > A friendly mail by Don made me look a bit closer: We can not
 > include <net/if.h> because we 
 > 
 > #define _FILE_OFFSET_BITS 64                 

ok, so now the question is can we have 64 bit file offsets and network
interface calls in the same C file?

One very hackish solution would be to undefine _FILE_OFFSET_BITS for
hpux in interfaces.c before we include system/network.h. We'd have to
be careful not to use anything that relied on off_t or similar types
(include struct stat) but it would be possible. (and very ugly!)

btw, does the following help in CFLAGS?

  -D_LARGEFILE64_SUPPORT -D__LP64__ -DO_LARGEFILE=04000

We needed that for the pread/pwrite problem on the same box, and I
wonder if it might help for net/if.h as well?

What we really need is a little test program that tests sizeof(off_t)
and probing network interfaces in one small C prog. Then we can keep
fiddling till it works.

Cheers, Tridge


More information about the samba-technical mailing list