Bug 11811 - compile error on Mac OS X 10.11 error: field has incomplete type 'struct timespec' LOADPARM_EXTRA_LOCALS
compile error on Mac OS X 10.11 error: field has incomplete type 'struct time...
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build
4.4.0
All All
: P5 normal
: ---
Assigned To: Samba QA Contact
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-27 10:49 UTC by Dave C
Modified: 2016-06-24 14:09 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave C 2016-03-27 10:49:59 UTC
[1311/3701] Compiling lib/dbwrap/dbwrap_cache.c
In file included from ../lib/dbwrap/dbwrap_cache.c:21:
In file included from ../lib/param/loadparm.h:253:
default/lib/param/param_local.h:143:1: error: field has incomplete type 'struct timespec'
LOADPARM_EXTRA_LOCALS
^
../lib/param/loadparm.h:247:18: note: expanded from macro 'LOADPARM_EXTRA_LOCALS'
        struct timespec usershare_last_mod;                             \
                        ^
default/lib/param/param_local.h:143:1: note: forward declaration of 'struct timespec'
../lib/param/loadparm.h:247:9: note: expanded from macro 'LOADPARM_EXTRA_LOCALS'
        struct timespec usershare_last_mod;                             \
               ^
1 error generated.
Waf: Leaving directory `/Volumes/hd2/src/samba-4.4.0/bin'
Build failed:  -> task failed (err #1): 
	{task: cc dbwrap_cache.c -> dbwrap_cache_1.o}
make: *** [all] Error 1
[dave@macpro ~/src/samba-4.4.0/]$ cd ..
Comment 1 s3 2016-05-18 09:22:47 UTC
Confirming for samba 4.4.3 on OSX 10.11.4 with clang+llvm-3.8.0-x86_64-apple-darwin:

[...]
[1304/3582] Compiling lib/dbwrap/dbwrap_rbt.c
[1305/3582] Compiling lib/dbwrap/dbwrap_cache.c
In file included from ../lib/dbwrap/dbwrap_cache.c:21:
In file included from ../lib/param/loadparm.h:259:
default/lib/param/param_local.h:143:1: error: field has incomplete type 'struct timespec'
LOADPARM_EXTRA_LOCALS
^
../lib/param/loadparm.h:253:18: note: expanded from macro 'LOADPARM_EXTRA_LOCALS'
        struct timespec usershare_last_mod;                             \
                        ^
default/lib/param/param_local.h:143:1: note: forward declaration of 'struct timespec'
../lib/param/loadparm.h:253:9: note: expanded from macro 'LOADPARM_EXTRA_LOCALS'
        struct timespec usershare_last_mod;                             \
               ^
1 error generated.
Waf: Leaving directory `/Volumes/home/opt/src/samba-4.4.3/bin'
Build failed:  -> task failed (err #1): 
        {task: cc dbwrap_cache.c -> dbwrap_cache_1.o}
make: *** [all] Error 1
Comment 2 Dmitri Dmitrienko 2016-05-30 18:42:47 UTC
This problem can be fixed by adding
#include <time.h>
to lib/param/loadparm.h
Comment 3 Dave C 2016-06-04 14:53:38 UTC
This problem can be fixed by adding
#include <time.h>
to lib/param/loadparm.h

CONFIRMED