mapserver fails to build on armhf due to implicit declaration of strlcpy

Bug #2058864 reported by Vladimir Petko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mapserver (Debian)
Fix Committed
Unknown
mapserver (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

--
/<<PKGBUILDDIR>>/mapshape.c: In function ‘msShapefileOpenHandle’:
/<<PKGBUILDDIR>>/mapshape.c:1755:3: error: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Werror=implicit-function-declaration]
 1755 | strlcpy(shpfile->source, filename, sizeof(shpfile->source));
      | ^~~~~~~
      | strncpy
/<<PKGBUILDDIR>>/mapshape.c: In function ‘msShapefileOpen’:
/<<PKGBUILDDIR>>/mapshape.c:1841:3: error: implicit declaration of function ‘strlcat’; did you mean ‘strncat’? [-Werror=implicit-function-declaration]
 1841 | strlcat(dbfFilename, ".dbf", bufferSize);
      | ^~~~~~~
      | strncat
--
See the build log[1]

strlcpy/strlcat function prototype is enabled in string.h when __USE_MISC macro is defined.
strlcpy/strlcat functions belong to a set of functions declared on BSD systems[2]

[1] https://launchpadlibrarian.net/720858988/buildlog_ubuntu-noble-armhf.mapserver_8.0.1-4build3_BUILDING.txt.gz
[2] https://linux.die.net/man/3/strlcat

Tags: ftbfs

Related branches

Revision history for this message
Vladimir Petko (vpa1977) wrote :

piuparts install/upgrade/purge test (pass)

tags: added: ftbfs
Changed in mapserver (Debian):
status: Unknown → Confirmed
Changed in mapserver (Debian):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mapserver - 8.0.1-4ubuntu1

---------------
mapserver (8.0.1-4ubuntu1) noble; urgency=medium

  * d/rules: define -D_BSD_SOURCE to ensure that strlcpy/strlcat functions
    are declared (LP: #2058864).

 -- Vladimir Petko <email address hidden> Mon, 25 Mar 2024 15:19:52 +1300

Changed in mapserver (Ubuntu):
status: New → Fix Released
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.