diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-11-04 17:49:29 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-11-05 01:50:00 +0000 |
commit | 78492d9dd21e3567a12f210ab4b3c79a66feea65 (patch) | |
tree | b02cf18448957a501394817336ea58a91c8ed5fa /dumpcap.c | |
parent | 196d7b433096b84f18f8d034d8d20298f2b9c3f2 (diff) |
Cope with newer Xcode not having the 10.6 SDK.
The latest Xcode, as of today, has only 10.9 and 10.10 SDKs, which means
that, if we build Wireshark and request a deployment minimum release of
10.6, we'll be building against an SDK in which libpcap has routines
that aren't available in 10.6 and that doesn't use weak linking for
them, so the resulting binary won't actually work on 10.6.
Use the run-time loader to find those routines (currently, only
pcap_set_tstamp_precision()) and call them only if we find them.
On other UN*Xes, we still assume that we'll be running only on the
release against which we were built and newer releases.
Change-Id: Iab20d86fe3be4b299cfb6e25c1f95dc6e1581661
Reviewed-on: https://code.wireshark.org/review/5120
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 15 |
1 files changed, 3 insertions, 12 deletions
@@ -730,18 +730,9 @@ open_capture_device(capture_options *capture_opts * that reads pcap files recognizes the nanosecond- * resolution pcap file magic number. */ - if (capture_opts->use_pcapng) { - /* - * The only errors this is documenting as returning - * are PCAP_ERROR_TSTAMP_PRECISION_NOTSUP, which just - * means we can't do nanosecond precision on this adapter, - * in which case we just live with whatever resolution - * we get by default, and PCAP_ERROR_ACTIVATED, which - * can't happen as we haven't activated the pcap_t yet. - */ - pcap_set_tstamp_precision(pcap_h, PCAP_TSTAMP_PRECISION_NANO); - } -#endif + if (capture_opts->use_pcapng) + request_high_resolution_timestamp(pcap_h); +#endif /* HAVE_PCAP_SET_TSTAMP_PRECISION */ g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_DEBUG, "buffersize %d.", interface_opts->buffer_size); |