Skip to content

Commit a7427dd

Browse files
dzhulgakovhouseroad
authored andcommitted
Fix build on mac (onnx#514)
1 parent 0a27129 commit a7427dd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

onnx/onnx_pb.h

+13
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@
44
#ifndef ONNX_ONNX_PB_H
55
#define ONNX_ONNX_PB_H
66

7+
/**
8+
* Macro for marking functions as having public visibility.
9+
* Ported from folly/CPortability.h
10+
*/
11+
#ifndef __GNUC_PREREQ
12+
#if defined __GNUC__ && defined __GNUC_MINOR__
13+
#define __GNUC_PREREQ(maj, min) \
14+
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
15+
#else
16+
#define __GNUC_PREREQ(maj, min) 0
17+
#endif
18+
#endif
19+
720
// Defines ONNX_EXPORT and ONNX_IMPORT. On Windows, this corresponds to
821
// different declarations (dllexport and dllimport). On Linux/Mac, it just
922
// resolves to the same "default visibility" setting.

0 commit comments

Comments
 (0)