dbLock.h: use of size_t without including stddef.h

Bug #1784631 reported by Ralph Lange
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EPICS Base
Status tracked in 7.0
3.16
Fix Released
Medium
Unassigned
7.0
Fix Released
Medium
Unassigned

Bug Description

From Florian Feldbauer ( florian _AT_ ep1.ruhr-uni-bochum.de ):

Just in case this is a bug in base 3.16.1: I was trying to build an IOC directly on my BeagleBone Black. I'm using the latest Debian Stretch image (gcc6.3.0).

Building EPICS base and CALC-Module worked without any problems. But building the IOC (with some custom device support) I got the following error:

> /usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -DUNIX -Dlinux -O3 -g -Wall -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/opt/epics/modules/calc/include -I/opt/epics/base/include/compiler/gcc -I/opt/epics/base/include/os/Linux -I/opt/epics/base/include -I/home/debian/isegHAL -c ../devIsegHalAsync.c
> In file included from ../devIsegHalAsync.c:37:0:
> /opt/epics/base/include/dbLock.h:33:40: error: unknown type name ‘size_t’
> size_t nrecs,
> ^~~~~~

I was able to fix this error by adding "#include <stddef.h> in base/include/dbLock.h

Revision history for this message
Ralph Lange (ralph-lange) wrote :

Affects 3.16 and newer.

Revision history for this message
Martin Konrad (info-martin-konrad) wrote :

I agree with Florian's compiler: According to the C99/C11 standards dbLock.h needs to include stddef.h to ensure size_t is defined. I opened a merge request.

Revision history for this message
Martin Konrad (info-martin-konrad) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.