mirror of
https://github.com/mvp/uhubctl.git
synced 2026-05-17 00:16:13 +03:00
Fixed snprintf override which breaks on old MacOS
`snprintf` is available in Mac/FreeBSD headers only if _XOPEN_SOURCE is 600 or higher. This closes #586.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 500
|
||||
#define _XOPEN_SOURCE 600
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -35,10 +35,6 @@
|
||||
#include <libusb-1.0/libusb.h>
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) || defined(__FreeBSD__) /* snprintf is not available in pure C mode */
|
||||
int snprintf(char * __restrict __str, size_t __size, const char * __restrict __format, ...) __printflike(3, 4);
|
||||
#endif
|
||||
|
||||
#if !defined(LIBUSB_API_VERSION) || (LIBUSB_API_VERSION <= 0x01000103)
|
||||
#define LIBUSB_DT_SUPERSPEED_HUB 0x2a
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user