Bug 11811 - compile error on Mac OS X 10.11 error: field has incomplete type 'struct timespec' LOADPARM_EXTRA_LOCALS
Summary: compile error on Mac OS X 10.11 error: field has incomplete type 'struct time...
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.4.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
: 12623 (view as bug list)
Depends on:
Blocks: 11984
  Show dependency treegraph
 
Reported: 2016-03-27 10:49 UTC by Dave C
Modified: 2017-11-14 10:54 UTC (History)
3 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 Ruga 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
Comment 4 Ruga 2017-03-10 11:19:17 UTC
Patched in https://bugzilla.samba.org/show_bug.cgi?id=12623
Comment 5 Björn Jacke 2017-05-30 16:17:50 UTC
*** Bug 12623 has been marked as a duplicate of this bug. ***