Skip to content

Commit d6af1a4

Browse files
committed
Merge pull request #20 from saghul/fix-compilation
Fix compilation on OSX
2 parents 2d70b59 + a381c1c commit d6af1a4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

getdns.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
#include "pygetdns.h"
4848

4949

50+
PyObject *getdns_error;
51+
5052

5153
PyMethodDef Context_methods[] = {
5254
{ "get_api_information", (PyCFunction)context_get_api_information,

pygetdns.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3030
*/
3131

32+
#ifndef PYGETDNS_H
33+
#define PYGETDNS_H
3234

3335
#define GETDNS_STR_IPV4 "IPv4"
3436
#define GETDNS_STR_IPV6 "IPv6"
@@ -37,7 +39,7 @@
3739
# define UNUSED_PARAM(x) ((void)(x))
3840
#endif
3941

40-
PyObject *getdns_error;
42+
extern PyObject *getdns_error;
4143

4244
typedef struct pygetdns_libevent_callback_data {
4345
void *userarg;
@@ -130,3 +132,5 @@ PyObject *dispatch_query(PyObject *context_capsule, void *name, uint16_t request
130132
PyObject *dispatch_query(PyObject *context_capsule, void *name, uint16_t request_type,
131133
PyDictObject *extensions_obj, void *userarg, long tid, char *callback);
132134
#endif
135+
136+
#endif /* PYGETDNS_H */

0 commit comments

Comments
 (0)