Skip to content

Commit

Permalink
fix inadequate parens in macro (my fault originally)
Browse files Browse the repository at this point in the history
  • Loading branch information
dholland committed Feb 26, 2015
1 parent bef45d8 commit 336c507
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sys/sys/dirent.h
@@ -1,4 +1,4 @@
/* $NetBSD: dirent.h,v 1.28 2011/09/27 01:40:32 christos Exp $ */
/* $NetBSD: dirent.h,v 1.29 2015/02/26 02:05:54 dholland Exp $ */

/*-
* Copyright (c) 1989, 1993
Expand Down Expand Up @@ -91,7 +91,7 @@ struct dirent {
* struct dirent
*/
#if __GNUC_PREREQ__(4, 0)
#define _DIRENT_NAMEOFF(dp) __builtin_offsetof(__typeof__(*dp), d_name)
#define _DIRENT_NAMEOFF(dp) __builtin_offsetof(__typeof__(*(dp)), d_name)
#else
#define _DIRENT_NAMEOFF(dp) \
((char *)(void *)&(dp)->d_name - (char *)(void *)dp)
Expand Down

0 comments on commit 336c507

Please sign in to comment.