mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
Drop requirement for socket library
The socket(2) library function is only required on Linux, and does not require special linker arguments to work. Closes #2360.
This commit is contained in:
parent
5eaccf91e2
commit
4bc220f349
2 changed files with 1 additions and 3 deletions
|
@ -270,7 +270,6 @@ esac
|
||||||
#
|
#
|
||||||
|
|
||||||
# Check for os dependant libraries for all binaries.
|
# Check for os dependant libraries for all binaries.
|
||||||
AC_SEARCH_LIBS( connect, [socket network], , [AC_MSG_ERROR([Cannot find the socket library, needed to build this package.] )] )
|
|
||||||
AC_SEARCH_LIBS( nanosleep, rt, , [AC_MSG_ERROR([Cannot find the rt library, needed to build this package.] )] )
|
AC_SEARCH_LIBS( nanosleep, rt, , [AC_MSG_ERROR([Cannot find the rt library, needed to build this package.] )] )
|
||||||
AC_SEARCH_LIBS( shm_open, rt, [AC_DEFINE([HAVE_SHM_OPEN], [1], [Define to 1 if the shm_open() function exists])] )
|
AC_SEARCH_LIBS( shm_open, rt, [AC_DEFINE([HAVE_SHM_OPEN], [1], [Define to 1 if the shm_open() function exists])] )
|
||||||
AC_SEARCH_LIBS( pthread_create, pthread, , [AC_MSG_ERROR([Cannot find the pthread library, needed to build this package.] )] )
|
AC_SEARCH_LIBS( pthread_create, pthread, , [AC_MSG_ERROR([Cannot find the pthread library, needed to build this package.] )] )
|
||||||
|
|
|
@ -16,10 +16,8 @@
|
||||||
#ifdef HAVE_SYS_SELECT_H
|
#ifdef HAVE_SYS_SELECT_H
|
||||||
#include <sys/select.h> // IWYU pragma: keep
|
#include <sys/select.h> // IWYU pragma: keep
|
||||||
#endif
|
#endif
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/time.h> // IWYU pragma: keep
|
#include <sys/time.h> // IWYU pragma: keep
|
||||||
#include <sys/types.h>
|
|
||||||
// We need the sys/file.h for the flock() declaration on Linux but not OS X.
|
// We need the sys/file.h for the flock() declaration on Linux but not OS X.
|
||||||
#include <sys/file.h> // IWYU pragma: keep
|
#include <sys/file.h> // IWYU pragma: keep
|
||||||
// We need the ioctl.h header so we can check if SIOCGIFHWADDR is defined by it so we know if we're
|
// We need the ioctl.h header so we can check if SIOCGIFHWADDR is defined by it so we know if we're
|
||||||
|
@ -866,6 +864,7 @@ void env_universal_t::parse_message_internal(const wcstring &msgstr, var_table_t
|
||||||
#ifdef SIOCGIFHWADDR
|
#ifdef SIOCGIFHWADDR
|
||||||
|
|
||||||
// Linux
|
// Linux
|
||||||
|
#include <sys/socket.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
static bool get_mac_address(unsigned char macaddr[MAC_ADDRESS_MAX_LEN],
|
static bool get_mac_address(unsigned char macaddr[MAC_ADDRESS_MAX_LEN],
|
||||||
const char *interface = "eth0") {
|
const char *interface = "eth0") {
|
||||||
|
|
Loading…
Reference in a new issue