Whamcloud - gitweb
lib, misc: eliminate dependency on Winsock
authorEric Biggers <ebiggers@google.com>
Sat, 21 Jan 2023 20:31:58 +0000 (12:31 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 27 Jan 2023 17:33:59 +0000 (12:33 -0500)
commit11f1e85ee3b96bdd08c69d8617cd82f5462e7f0b
tree4a3a5ce95eb71f9e87995f2fb6d8ce75f3358c4c
parent073feec96664cd241c9e300b42f63aba1a2c9f4f
lib, misc: eliminate dependency on Winsock

Currently Windows builds of e2fsprogs rely on the Windows Socket API
(Winsock) to provide htonl() and ntohl().  For this to actually work,
though, HAVE_WINSOCK_H needs to be defined, and the binaries need to be
linked to -lws2_32.  The Android.bp files do this; however, the
autotools-based build system does not.

Since htonl() and ntohl() are trivial, let's instead just add a file
include/mingw/arpa/inet.h with definitions for these.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
include/mingw/arpa/inet.h [new file with mode: 0644]
lib/e2p/Android.bp
lib/ext2fs/Android.bp
lib/ext2fs/jfs_compat.h
misc/Android.bp
util/android_config.h