e2fsprogs 1.46.2 needs #include <time.h> in probe.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am the maintainer of e2fsprogs in MacPorts. The developer of e2fsprogs has asked me to report patches for his program to this mailing list.

e2fsprogs 1.46.2 does not build on macOS when implicit declaration of functions is considered an error. This condition can be achieved either by adding -Werror=implicit-function-declaration to CFLAGS when configuring or by compiling with the version of clang included with Xcode 12 or later on macOS in which that behavior is the default.

The error messages are:


probe.c:285:16: error: implicit declaration of function 'time' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        time_t          now = time(0);
                              ^
probe.c:1677:9: error: implicit declaration of function 'difftime' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        diff = difftime(now, dev->bid_time);
               ^
2 errors generated.


The fix is to #include <time.h> in probe.c per the attached patch.

This problem and the fix were reported to MacPorts against e2fsprogs 1.45.6 here: https://github.com/macports/macports-ports/pull/9137

Please Cc me on replies if you need further information.

Attachment: patch-probe.c.diff
Description: Binary data


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux