Skip to content

Commit 218a378

Browse files
committed
Update --version option to print 32/64-bit build and time_t size
Use only sizeof() and not SIZEOF_VOID_P/SIZEOF_TIME_T because these macros could have invalid values in some macOS fat builds (See commit 170cbc8). This method should be future proof. With this change we know: whether this is a 32-bit or 64-bit build; whether the time_t size is 32-bit or 64-bit. [skip ci]
1 parent 12ab216 commit 218a378

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tcpdump.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3341,6 +3341,8 @@ print_version(FILE *f)
33413341
(void)fprintf (f, "Compiled with MemorySanitizer/Clang.\n");
33423342
# endif
33433343
#endif /* __SANITIZE_ADDRESS__ or __has_feature */
3344+
(void)fprintf (f, "%zu-bit build, %zu-bit time_t\n",
3345+
sizeof(void *) * 8, sizeof(time_t) * 8);
33443346
}
33453347
DIAG_ON_DEPRECATION
33463348

0 commit comments

Comments
 (0)