mirror of
https://github.com/reactos/ccache.git
synced 2025-03-04 16:58:54 +00:00
some systems don't have gethostname() ....
This commit is contained in:
parent
1edf1afde2
commit
6c0d53595c
2
ccache.c
2
ccache.c
@ -128,7 +128,9 @@ static const char *tmp_string(void)
|
||||
if (!ret) {
|
||||
char hostname[200];
|
||||
strcpy(hostname, "unknown");
|
||||
#if HAVE_GETHOSTNAME
|
||||
gethostname(hostname, sizeof(hostname)-1);
|
||||
#endif
|
||||
hostname[sizeof(hostname)-1] = 0;
|
||||
asprintf(&ret, "%s.%u", hostname, (unsigned)getpid());
|
||||
}
|
||||
|
@ -16,6 +16,9 @@
|
||||
*/
|
||||
#undef HAVE_DIRENT_H
|
||||
|
||||
/* Define to 1 if you have the `gethostname' function. */
|
||||
#undef HAVE_GETHOSTNAME
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
|
3
configure
vendored
3
configure
vendored
@ -3269,7 +3269,8 @@ done
|
||||
|
||||
|
||||
|
||||
for ac_func in realpath snprintf vsnprintf vasprintf asprintf mkstemp
|
||||
|
||||
for ac_func in realpath snprintf vsnprintf vasprintf asprintf mkstemp gethostname
|
||||
do
|
||||
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||||
|
@ -29,7 +29,7 @@ AC_HEADER_SYS_WAIT
|
||||
|
||||
AC_CHECK_HEADERS(ctype.h strings.h stdlib.h string.h)
|
||||
|
||||
AC_CHECK_FUNCS(realpath snprintf vsnprintf vasprintf asprintf mkstemp)
|
||||
AC_CHECK_FUNCS(realpath snprintf vsnprintf vasprintf asprintf mkstemp gethostname)
|
||||
|
||||
AC_CACHE_CHECK([for compar_fn_t in stdlib.h],ccache_cv_COMPAR_FN_T, [
|
||||
AC_TRY_COMPILE(
|
||||
|
Loading…
x
Reference in New Issue
Block a user