title: Compiler gets warnings when using strptime function (C)
body: <p>Typing <code>man strptime</code> it sais that this function needs to have declared _XOPEN_SOURCE and included time.h header. I did it. But, when I try to compile my code I get:</p>
  
  <blockquote>
    <p>./check.c:56: warning: implicit declaration of function ‘strptime’</p>
  </blockquote>
  
  <p>Look at my code:</p>
  
  <pre><code>int lockExpired(const char *date, const char *format, time_t current) {
          struct tm *tmp = malloc(sizeof(struct tm *));
          time_t lt;
          int et;
  
          strptime(date, format, tmp);
          lt = mktime(tmp);
          et = difftime(current, lt);
  
          if (et &lt; 3600)
                  return -et;
  
          return 1;
  }
  </code></pre>
  
  <p>Also the function declaration is:</p>
  
  <p><code>char *strptime(const char *s, const char *format, struct tm *tm);</code></p>
  
  <p>Can anyone tell me where my problem come from?</p>