Whamcloud - gitweb
misc/util.c: enable MinGW alarm() when building for Windows
authorEric Biggers <ebiggers@google.com>
Sat, 21 Jan 2023 20:32:28 +0000 (12:32 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 27 Jan 2023 17:39:19 +0000 (12:39 -0500)
commit60a1a6fb4caadaa45f6a64f392aaf90064d5da9b
tree08ccba4ff3f83b4f4fbdbc08edb658a5598b3328
parent84f6d920b40f89d6c894ac7ad3d0f1a300fc93e7
misc/util.c: enable MinGW alarm() when building for Windows

To compile for Windows, this file needs MinGW's implementation of
alarm().  To expose that definition, some macros must be defined before
including the system headers.  This was done in Android.bp, but it was
not done in the autotools-based build system.  Define these macros in
the source file itself so that all build systems work.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/Android.bp
misc/util.c