#include <config.h>
#endif /* HAVE_CONFIG_H */
-#include <sys/types.h>
-/* crypt needs _XOPEN_SOURCE (500) at least on BSD, but that breaks Solaris compile */
-#ifdef NETBSD
-#define _XOPEN_SOURCE 500 /* for crypt() */
-#endif
-#ifdef FREEBSD
-#define _XOPEN_SOURCE /* for crypt() */
-#endif
+#include <atalk/standards.h>
+#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef SHADOWPW
#include <shadow.h>
#endif /* SHADOWPW */
+#include <arpa/inet.h>
#include <atalk/afp.h>
#include <atalk/logger.h>
#include <atalk/uam.h>
#include <atalk/util.h>
+#include <atalk/compat.h>
#define PASSWDLEN 8
}
pwd->pw_passwd = sp->sp_pwdp;
- if (sp && sp->sp_max != -1 && sp->sp_lstchg) {
+ if (sp->sp_max != -1 && sp->sp_lstchg) {
time_t now = time(NULL) / (60*60*24);
int32_t expire_days = sp->sp_lstchg - now + sp->sp_max;
if ( expire_days < 0 ) {
{
char *username;
size_t len, ulen;
- u_int16_t temp16;
+ uint16_t temp16;
*rbuflen = 0;
}
pwd->pw_passwd = sp->sp_pwdp;
- if (sp && sp->sp_max != -1 && sp->sp_lstchg) {
+ if (sp->sp_max != -1 && sp->sp_lstchg) {
time_t now = time(NULL) / (60*60*24);
int32_t expire_days = sp->sp_lstchg - now + sp->sp_max;
if ( expire_days < 0 ) {