svn commit: r341006 - head/sys/netgraph

Eugene Grosbein eugen at FreeBSD.org
Tue Nov 27 04:05:39 UTC 2018


Author: eugen
Date: Tue Nov 27 04:05:38 2018
New Revision: 341006
URL: https://svnweb.freebsd.org/changeset/base/341006

Log:
  ng_source(4): correction after the change r340617
  
  tv_usec has "long" type for all architecture in FreeBSD
  and follows __LP64__. However, this is not true for tv_sec
  that has "time_t" type.
  
  Since r320347 that changed time_t from 32 to 64 bit integer
  for 32 bit version of powerpc architecture, we have only single
  i386 architecture having 32 bit time_t type.
  
  Submitted by:	jhb
  MFC after:	1 week.

Modified:
  head/sys/netgraph/ng_source.c

Modified: head/sys/netgraph/ng_source.c
==============================================================================
--- head/sys/netgraph/ng_source.c	Tue Nov 27 00:36:35 2018	(r341005)
+++ head/sys/netgraph/ng_source.c	Tue Nov 27 04:05:38 2018	(r341006)
@@ -125,11 +125,14 @@ static int		ng_source_dup_mod(sc_p, struct mbuf *,
 
 /* Parse type for timeval */
 static const struct ng_parse_struct_field ng_source_timeval_type_fields[] = {
-#ifdef __LP64__
+#ifdef __i386__
+	{ "tv_sec",		&ng_parse_int32_type	},
+#else
 	{ "tv_sec",		&ng_parse_int64_type	},
+#endif
+#ifdef __LP64__
 	{ "tv_usec",		&ng_parse_int64_type	},
 #else
-	{ "tv_sec",		&ng_parse_int32_type	},
 	{ "tv_usec",		&ng_parse_int32_type	},
 #endif
 	{ NULL }


More information about the svn-src-all mailing list