[PATCH 3/3] Add missing <time.h> include

Ben Gamari bgamari.foss at gmail.com
Sun Jun 14 00:06:29 PDT 2009


Fix compiler warning,

imLcIm.c:383: warning: implicit declaration of function ‘time’
imLcIm.c:383: warning: nested extern declaration of ‘time’
---
 modules/im/ximcp/imLcIm.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/im/ximcp/imLcIm.c b/modules/im/ximcp/imLcIm.c
index e398112..8299b31 100644
--- a/modules/im/ximcp/imLcIm.c
+++ b/modules/im/ximcp/imLcIm.c
@@ -52,6 +52,7 @@ THIS SOFTWARE.
 #include "Ximint.h"
 #include <ctype.h>
 #include <assert.h>
+#include <time.h>
 
 #ifdef COMPOSECACHE
 #  include <sys/types.h>
@@ -383,7 +384,7 @@ Private int _XimCachedFileName (
 
     if (! S_ISREG (st.st_mode) || st.st_uid != uid
        || (st.st_mode & 0022) != 0000 || st.st_mtime <= st_name.st_mtime
-       || (st.st_mtime < time (NULL) - 24*60*60 && ! isglobal)) {
+       || (st.st_mtime < time(NULL) - 24*60*60 && ! isglobal)) {
 
        close (fd);
        if (unlink (*res) != 0) {
-- 
1.6.3.1




More information about the xorg mailing list