lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 11 Apr 2021 07:57:33 -0500
From:   Ryan Schmidt <ryandesign@...ports.org>
To:     linux-ext4@...r.kernel.org
Subject: e2fsprogs 1.46.2 needs #include <time.h> in probe.c

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.


Download attachment "patch-probe.c.diff" of type "application/octet-stream" (283 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ