Opened 18 months ago

Closed 7 months ago

#65913 closed defect (fixed)

legacy-support: tests: failure due to fstatat64

Reported by: mascguy (Christopher Nielsen) Owned by: cjones051073 (Chris Jones)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: Cc: kencu (Ken), michaelld (Michael Dickens)
Port: legacy-support

Description (last modified by mascguy (Christopher Nielsen))

Perhaps this varies depending on which macOS release the tests are run on. But at least for 10.15, they fail with the following error:

test/test_fstatat64.c:93:12: error: implicit declaration of function 'fstatat64' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  if (0 != fstatat64 (AT_FDCWD, argv[0], &atfdcwd_stat64, 0)) {
           ^

Change History (4)

comment:1 Changed 18 months ago by mascguy (Christopher Nielsen)

Description: modified (diff)

comment:2 Changed 18 months ago by kencu (Ken)

I get much the same, but a warning not an error, on 10.13:

/usr/bin/clang -c -std=c99 -Iinclude -Os -arch x86_64 test/test_fstatat64.c -o test/test_fstatat64.o
test/test_fstatat64.c:81:12: warning: 'stat64' is deprecated: first deprecated in macOS 10.6 [-Wdeprecated-declarations]
  if (0 != stat64 (argv[0], &orig_stat64)) {
           ^
/usr/include/sys/stat.h:402:5: note: 'stat64' has been explicitly marked deprecated here
int     stat64(const char *, struct stat64 *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5,__MAC_10_6,__IPHONE_NA,__IPHONE_NA);
        ^
test/test_fstatat64.c:93:12: warning: implicit declaration of function 'fstatat64' is invalid in C99 [-Wimplicit-function-declaration]
  if (0 != fstatat64 (AT_FDCWD, argv[0], &atfdcwd_stat64, 0)) {
           ^
2 warnings generated.
/usr/bin/clang -Llib -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 test/test_fstatat64.o -lMacportsLegacySupport -o test/test_fstatat64
test/test_fstatat64

I guess that test should be looked at more carefully to see when/if it should be run.

comment:4 Changed 7 months ago by Christopher Nielsen <mascguy@…>

Resolution: fixed
Status: assignedclosed

In 6c10a2358ca52e2bb44e692f4de4fdef966c6e98/macports-legacy-support (master):

fstatat64: tests: add declaration for fstatat64()

Fixes: #65913

Note: See TracTickets for help on using tickets.