Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922373 - net-fs/nfs-utils-2.6.4 - fsidd.c:37:3: error: call to undeclared function 'close'; ISO C99 and later do not support
Summary: net-fs/nfs-utils-2.6.4 - fsidd.c:37:3: error: call to undeclared function 'cl...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH, REGRESSION
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2024-01-18 10:18 UTC by ernsteiswuerfel
Modified: 2024-01-19 05:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (nfs-utils-2.6.4:20240118-100628.log,61.71 KB, text/plain)
2024-01-18 10:18 UTC, ernsteiswuerfel
Details
emerge --info (file_922373.txt,7.33 KB, text/plain)
2024-01-18 10:19 UTC, ernsteiswuerfel
Details
build.log (2.6.3-r2) (nfs-utils-2.6.3-r2:20240118-094855.log,139.32 KB, text/plain)
2024-01-18 10:20 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2024-01-18 10:18:52 UTC
Created attachment 882526 [details]
build.log

2.6.3-r2 builds fine on musl-clang but 2.6.4 fails with:

[...]
make[2]: Entering directory '/var/tmp/portage/net-fs/nfs-utils-2.6.4/work/nfs-utils-2.6.4/support/reexport'
clang -DHAVE_CONFIG_H -I. -I../../support/include  -I/usr/include/tirpc   -I../../support/include  -Wall  -Wextra  -Werror=strict-prototypes  -fno-strict-aliasing  -Os -march=znver2 -pipe -c -o fsidd-fsidd.o `test -f 'fsidd.c' || echo './'`fsidd.c
fsidd.c:37:3: error: call to undeclared function 'close'; ISO C99 and later do not support
      implicit function declarations [-Wimplicit-function-declaration]
   37 |                 close(cl);
      |                 ^
fsidd.c:55:5: warning: expression result unused [-Wunused-value]
   55 |                                 assert_safe(asprintf(&answer, "+ %u", fsidnum) != -1);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fsidd.c:23:69: note: expanded from macro 'assert_safe'
   23 | #define assert_safe(__sideeffect) (__sideeffect ? 0 : ({assert(0) ; 0;}))
      |                                                                     ^
fsidd.c:57:5: warning: expression result unused [-Wunused-value]
   57 |                                 assert_safe(asprintf(&answer, "+ ") != -1);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fsidd.c:23:69: note: expanded from macro 'assert_safe'
   23 | #define assert_safe(__sideeffect) (__sideeffect ? 0 : ({assert(0) ; 0;}))
      |                                                                     ^
fsidd.c:59:4: warning: expression result unused [-Wunused-value]
   59 |                         assert_safe(asprintf(&answer, "- %s", "Command failed") != -1);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fsidd.c:23:69: note: expanded from macro 'assert_safe'
   23 | #define assert_safe(__sideeffect) (__sideeffect ? 0 : ({assert(0) ; 0;}))
      |                                                                     ^
fsidd.c:76:5: warning: expression result unused [-Wunused-value]
   76 |                                 assert_safe(asprintf(&answer, "+ %u", fsidnum) != -1);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fsidd.c:23:69: note: expanded from macro 'assert_safe'
   23 | #define assert_safe(__sideeffect) (__sideeffect ? 0 : ({assert(0) ; 0;}))
      |                                                                     ^
fsidd.c:78:5: warning: expression result unused [-Wunused-value]
   78 |                                 assert_safe(asprintf(&answer, "+ ") != -1);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fsidd.c:23:69: note: expanded from macro 'assert_safe'
   23 | #define assert_safe(__sideeffect) (__sideeffect ? 0 : ({assert(0) ; 0;}))
      |                                                                     ^
fsidd.c:82:4: warning: expression result unused [-Wunused-value]
   82 |                         assert_safe(asprintf(&answer, "- %s", "Command failed") != -1);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fsidd.c:23:69: note: expanded from macro 'assert_safe'
   23 | #define assert_safe(__sideeffect) (__sideeffect ? 0 : ({assert(0) ; 0;}))
      |                                                                     ^
fsidd.c:104:4: warning: expression result unused [-Wunused-value]
  104 |                         assert_safe(asprintf(&answer, "- %s", "Command failed: Bad input") != -1);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fsidd.c:23:69: note: expanded from macro 'assert_safe'
   23 | #define assert_safe(__sideeffect) (__sideeffect ? 0 : ({assert(0) ; 0;}))
      |                                                                     ^
fsidd.c:108:6: warning: expression result unused [-Wunused-value]
  108 |                                         assert_safe(asprintf(&answer, "+ %s", path) != -1);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fsidd.c:23:69: note: expanded from macro 'assert_safe'
   23 | #define assert_safe(__sideeffect) (__sideeffect ? 0 : ({assert(0) ; 0;}))
      |                                                                     ^
fsidd.c:110:6: warning: expression result unused [-Wunused-value]
  110 |                                         assert_safe(asprintf(&answer, "+ ") != -1);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fsidd.c:23:69: note: expanded from macro 'assert_safe'
   23 | #define assert_safe(__sideeffect) (__sideeffect ? 0 : ({assert(0) ; 0;}))
      |                                                                     ^
fsidd.c:112:5: warning: expression result unused [-Wunused-value]
  112 |                                 assert_safe(asprintf(&answer, "+ ") != -1);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fsidd.c:23:69: note: expanded from macro 'assert_safe'
   23 | #define assert_safe(__sideeffect) (__sideeffect ? 0 : ({assert(0) ; 0;}))
      |                                                                     ^
fsidd.c:127:3: warning: expression result unused [-Wunused-value]
  127 |                 assert_safe(asprintf(&answer, "- bad command") != -1);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fsidd.c:23:69: note: expanded from macro 'assert_safe'
   23 | #define assert_safe(__sideeffect) (__sideeffect ? 0 : ({assert(0) ; 0;}))
      |                                                                     ^
fsidd.c:168:3: error: call to undeclared function 'unlink'; ISO C99 and later do not support
      implicit function declarations [-Wimplicit-function-declaration]
  168 |                 unlink(sock_file);
      |                 ^
11 warnings and 2 errors generated.
make[2]: *** [Makefile:556: fsidd-fsidd.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/net-fs/nfs-utils-2.6.4/work/nfs-utils-2.6.4/support/reexport'
make[1]: *** [Makefile:450: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-fs/nfs-utils-2.6.4/work/nfs-utils-2.6.4/support'
make: *** [Makefile:491: all-recursive] Error 1
 * ERROR: net-fs/nfs-utils-2.6.4::gentoo failed (compile phase):
 *   emake failed
Comment 1 ernsteiswuerfel archtester 2024-01-18 10:19:33 UTC
Created attachment 882527 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2024-01-18 10:20:02 UTC
Created attachment 882528 [details]
build.log (2.6.3-r2)
Comment 4 Larry the Git Cow gentoo-dev 2024-01-19 05:39:12 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9118184cd1e0ca66b3a689efb707ec8e0dfaf8e3

commit 9118184cd1e0ca66b3a689efb707ec8e0dfaf8e3
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-19 05:38:25 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-19 05:39:00 +0000

    net-fs/nfs-utils: fix modern C issues
    
    Closes: https://bugs.gentoo.org/922373
    Signed-off-by: Sam James <sam@gentoo.org>

 .../nfs-utils/files/nfs-utils-2.6.4-includes.patch |  41 ++++
 net-fs/nfs-utils/nfs-utils-2.6.4-r1.ebuild         | 234 +++++++++++++++++++++
 2 files changed, 275 insertions(+)