diff options
Diffstat (limited to 'source3')
-rwxr-xr-x | source3/configure | 2 | ||||
-rw-r--r-- | source3/configure.in | 2 | ||||
-rw-r--r-- | source3/include/config.h.in | 3 | ||||
-rw-r--r-- | source3/printing/print_svid.c | 4 | ||||
-rw-r--r-- | source3/smbd/dfree.c | 2 |
5 files changed, 11 insertions, 2 deletions
diff --git a/source3/configure b/source3/configure index 97366dbdef..fd6902bf2e 100755 --- a/source3/configure +++ b/source3/configure @@ -4203,7 +4203,7 @@ else fi done -for ac_func in initgroups select rdchk getgrnam getgrent pathconf +for ac_func in initgroups select rdchk getgrnam getgrent pathconf popen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:4210: checking for $ac_func" >&5 diff --git a/source3/configure.in b/source3/configure.in index d3e87c516e..4f78de7df7 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -352,7 +352,7 @@ AC_CHECK_FUNCS(waitpid getcwd strdup strtoul strerror chown chmod chroot) AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync bzero memset) AC_CHECK_FUNCS(memmove vsnprintf snprintf setsid glob strpbrk pipe crypt16 getauthuid) AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent) -AC_CHECK_FUNCS(initgroups select rdchk getgrnam getgrent pathconf) +AC_CHECK_FUNCS(initgroups select rdchk getgrnam getgrent pathconf popen) AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups mktime rename ftruncate stat64 fstat64) AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64) AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid yp_get_default_domain getpwanam) diff --git a/source3/include/config.h.in b/source3/include/config.h.in index 732798ac24..49344a05c8 100644 --- a/source3/include/config.h.in +++ b/source3/include/config.h.in @@ -547,6 +547,9 @@ /* Define if you have the pipe function. */ #undef HAVE_PIPE +/* Define if you have the popen function. */ +#undef HAVE_POPEN + /* Define if you have the pread function. */ #undef HAVE_PREAD diff --git a/source3/printing/print_svid.c b/source3/printing/print_svid.c index 85eaf8f95d..ffc059f9f9 100644 --- a/source3/printing/print_svid.c +++ b/source3/printing/print_svid.c @@ -47,6 +47,7 @@ static printer_t *printers = NULL; static void populate_printers(void) { +#ifdef HAVE_POPEN FILE *fp; if ((fp = popen("/usr/bin/lpstat -v", "r")) != NULL) { @@ -91,6 +92,9 @@ static void populate_printers(void) } else { DEBUG(0,( "Unable to run lpstat!\n")); } +#else + DEBUG(0,( "No popen() defined: Unable to run lpstat!\n")); +#endif } diff --git a/source3/smbd/dfree.c b/source3/smbd/dfree.c index bd06d3f235..7838080461 100644 --- a/source3/smbd/dfree.c +++ b/source3/smbd/dfree.c @@ -208,6 +208,7 @@ static SMB_BIG_UINT disk_free(char *path, BOOL small_query, * If external disk calculation specified, use it. */ +#ifdef HAVE_POPEN dfree_command = lp_dfree_command(); if (dfree_command && *dfree_command) { pstring line; @@ -249,6 +250,7 @@ static SMB_BIG_UINT disk_free(char *path, BOOL small_query, fsusage(path, dfree, dsize); } } else +#endif /* HAVE_POPEN */ fsusage(path, dfree, dsize); if (disk_quotas(path, &bsize_q, &dfree_q, &dsize_q)) { |