Skip to content

Commit e52f03d

Browse files
flichtenheldcron2
authored andcommitted
configure/CMake: Remove unused checks
Do not run configure checks that we do not actually need. But add one missing check in CMake for strsep! Change-Id: I0da2cc8bbe9e394d1bb55cff496ea3e11584ca20 Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> Acked-by: Gert Doering <gert@greenie.muc.de> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1409 Message-Id: <20251127105343.30723-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34740.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
1 parent 2abfb75 commit e52f03d

File tree

3 files changed

+5
-31
lines changed

3 files changed

+5
-31
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ endif()
240240

241241
check_symbol_exists(chsize io.h HAVE_CHSIZE)
242242
check_symbol_exists(getrlimit sys/resource.h HAVE_GETRLIMIT)
243+
check_symbol_exists(strsep string.h HAVE_STRSEP)
243244

244245
# Some OS (e.g. FreeBSD) need some basic headers to allow
245246
# including network headers

config.h.cmake.in

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,6 @@
281281
/* Define to 1 if you have the <syslog.h> header file. */
282282
#cmakedefine HAVE_SYSLOG_H
283283

284-
/* Define to 1 if you have the `system' function. */
285-
#undef HAVE_SYSTEM
286-
287284
/* Define to 1 if you have the <systemd/sd-daemon.h> header file. */
288285
#undef HAVE_SYSTEMD_SD_DAEMON_H
289286

@@ -332,12 +329,6 @@
332329
/* Define to 1 if you have the <tap-windows.h> header file. */
333330
#undef HAVE_TAP_WINDOWS_H
334331

335-
/* Define to 1 if you have the `time' function. */
336-
#define HAVE_TIME 1
337-
338-
/* Define to 1 if you have the <time.h> header file. */
339-
#define HAVE_TIME_H 1
340-
341332
/* Define to 1 if you have the <uapi.h> header file. */
342333
#undef HAVE_UAPI_H
343334

@@ -347,12 +338,6 @@
347338
/* Define to 1 if you have the <valgrind/memcheck.h> header file. */
348339
#undef HAVE_VALGRIND_MEMCHECK_H
349340

350-
/* Define to 1 if you have the `vfork' function. */
351-
#undef HAVE_VFORK
352-
353-
/* Define to 1 if you have the <vfork.h> header file. */
354-
#undef HAVE_VFORK_H
355-
356341
/* Availability of different mbed TLS features and APIs */
357342
#cmakedefine HAVE_PSA_CRYPTO_H
358343
#cmakedefine HAVE_MBEDTLS_SSL_SET_EXPORT_KEYS_CB

configure.ac

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -475,13 +475,7 @@ ifdef(
475475
)
476476

477477
AC_C_INLINE
478-
AC_TYPE_OFF_T
479-
AC_TYPE_PID_T
480-
AC_TYPE_SIZE_T
481-
AC_TYPE_UID_T
482478
AX_TYPE_SOCKLEN_T
483-
AC_CHECK_SIZEOF([unsigned int])
484-
AC_CHECK_SIZEOF([unsigned long])
485479
AC_CHECK_HEADERS([ \
486480
fcntl.h io.h \
487481
sys/types.h sys/socket.h \
@@ -492,7 +486,7 @@ AC_CHECK_HEADERS([ \
492486
AC_CHECK_HEADERS([ \
493487
sys/time.h sys/ioctl.h sys/stat.h \
494488
sys/mman.h sys/file.h sys/wait.h \
495-
unistd.h libgen.h stropts.h \
489+
libgen.h stropts.h \
496490
syslog.h pwd.h grp.h termios.h \
497491
sys/sockio.h sys/uio.h \
498492
poll.h sys/epoll.h err.h \
@@ -545,12 +539,6 @@ AC_CHECK_TYPES(
545539
[AC_DEFINE([in_port_t], [uint16_t], [Workaround missing in_port_t])],
546540
[[${SOCKET_INCLUDES}]]
547541
)
548-
AC_CHECK_TYPE(
549-
[struct iphdr],
550-
[AC_DEFINE([HAVE_IPHDR], [1], [struct iphdr needed for IPv6 support])],
551-
,
552-
[[${SOCKET_INCLUDES}]]
553-
)
554542
AC_CHECK_TYPE(
555543
[struct msghdr],
556544
[AC_DEFINE([HAVE_MSGHDR], [1], [struct msghdr needed for extended socket error support])],
@@ -657,11 +645,11 @@ AC_CHECK_DECLS(
657645
AC_FUNC_FORK
658646

659647
AC_CHECK_FUNCS([ \
660-
daemon chroot getpwnam setuid nice system dup dup2 \
648+
daemon chroot getpwnam setuid nice dup dup2 \
661649
syslog openlog mlockall getrlimit getgrnam setgid \
662-
setgroups flock time gettimeofday \
650+
setgroups flock gettimeofday \
663651
setsid chdir \
664-
chsize ftruncate execve getpeereid basename dirname access \
652+
chsize ftruncate execve getpeereid basename dirname \
665653
epoll_create strsep \
666654
])
667655

0 commit comments

Comments
 (0)