summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/debug.c4
-rw-r--r--source3/lib/md4.c1
-rw-r--r--source3/lib/pidfile.c4
-rw-r--r--source3/lib/time.c2
-rw-r--r--source3/lib/util.c4
5 files changed, 10 insertions, 5 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index 0418098fb2..6b7b9341a3 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -108,7 +108,9 @@ int DEBUGLEVEL = 1;
static BOOL stdout_logging = False;
static int debug_count = 0;
+#ifdef WITH_SYSLOG
static int syslog_level = 0;
+#endif
static pstring format_bufr = { '\0' };
static int format_pos = 0;
@@ -513,8 +515,10 @@ BOOL dbghdr( int level, char *file, char *func, int line )
return( True );
}
+#ifdef WITH_SYSLOG
/* Set syslog_level. */
syslog_level = level;
+#endif
/* Don't print a header if we're logging to stdout. */
if( stdout_logging )
diff --git a/source3/lib/md4.c b/source3/lib/md4.c
index 812566dbd3..f0050ee647 100644
--- a/source3/lib/md4.c
+++ b/source3/lib/md4.c
@@ -19,6 +19,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+void *memcpy (void *, void *, unsigned int);
/* NOTE: This code makes no attempt to be fast!
diff --git a/source3/lib/pidfile.c b/source3/lib/pidfile.c
index b8c782f3d6..7e98438dba 100644
--- a/source3/lib/pidfile.c
+++ b/source3/lib/pidfile.c
@@ -30,7 +30,7 @@ extern int DEBUGLEVEL;
/* return the pid in a pidfile. return 0 if the process (or pidfile)
does not exist */
-int pidfile_pid(char *name)
+pid_t pidfile_pid(char *name)
{
FILE *f;
unsigned ret;
@@ -51,7 +51,7 @@ int pidfile_pid(char *name)
if (!process_exists(ret)) return 0;
- return ret;
+ return (pid_t)ret;
}
/* create a pid file in the lock directory. open it and leave it locked */
diff --git a/source3/lib/time.c b/source3/lib/time.c
index 89a83ebfc1..529f0ceb44 100644
--- a/source3/lib/time.c
+++ b/source3/lib/time.c
@@ -470,7 +470,7 @@ time_t make_unix_date2(void *date_ptr)
******************************************************************/
time_t make_unix_date3(void *date_ptr)
{
- time_t t = IVAL(date_ptr,0);
+ time_t t = (time_t)IVAL(date_ptr,0);
if (!null_mtime(t))
t += LocTimeDiff(t);
return(t);
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 72eb1a89c3..e82abf8c7c 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1926,8 +1926,8 @@ ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned
select always returns true on disk files */
/* Set initial timeout */
- timeout.tv_sec = time_out / 1000;
- timeout.tv_usec = 1000 * (time_out % 1000);
+ timeout.tv_sec = (time_t)(time_out / 1000);
+ timeout.tv_usec = (long)(1000 * (time_out % 1000));
for (nread=0; nread < mincnt; )
{