Date: Sun, 14 Nov 2010 21:55:12 -0800 From: Garrett Cooper <yanegomi@gmail.com> To: freebsd-hackers@freebsd.org Subject: Re: [PATCH] Fix lib/libpam's include of sys/time.h Message-ID: <AANLkTi=BYVFJQ4F5%2B_9=At2%2Bxh-MVxjkxsoquzGU8MzQ@mail.gmail.com> In-Reply-To: <AANLkTi=j_To50_cTV8vPxbNuOCarmdbuASue7dbXp5=g@mail.gmail.com> References: <AANLkTi=j_To50_cTV8vPxbNuOCarmdbuASue7dbXp5=g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Sun, Nov 14, 2010 at 9:14 PM, Garrett Cooper <yanegomi@gmail.com> wrote:
> libpam uses sys/time.h to pick up ctime, but it's actually defined
> in time.h according to POSIX and the ctime manpage.
> If someone could help review and commit this patch, it would be
> much appreciated. This is part of a much larger change to fix
> namespace pollution with time.h in sys/time.h.
Sorry... missed the gettimeofday requirement in the lib. The
library fully compiles with this patch (where sys/time.h isn't
removed). This is POSIX compliant.
Thanks,
-Garrett
[-- Attachment #2 --]
Index: /usr/src/lib/libpam/modules/pam_unix/pam_unix.c
===================================================================
--- /usr/src/lib/libpam/modules/pam_unix/pam_unix.c (revision 215333)
+++ /usr/src/lib/libpam/modules/pam_unix/pam_unix.c (working copy)
@@ -50,6 +50,7 @@
#include <string.h>
#include <stdio.h>
#include <syslog.h>
+#include <time.h>
#include <unistd.h>
#include <libutil.h>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=BYVFJQ4F5%2B_9=At2%2Bxh-MVxjkxsoquzGU8MzQ>
