Skip to content

Commit

Permalink
Merge pull request #63 from larsewi/arpa
Browse files Browse the repository at this point in the history
Fixed undefined header file error on Windows
  • Loading branch information
larsewi authored May 2, 2024
2 parents 3eb2377 + cf1a12b commit 31f3df4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.63])
AC_INIT([leech], [0.1.9], [https://github.com/larsewi/leech/issues], [leech],
AC_INIT([leech], [0.1.10], [https://github.com/larsewi/leech/issues], [leech],
[https://github.com/larsewi/leech])
AC_CONFIG_SRCDIR([lib/leech.h])

Expand Down
8 changes: 7 additions & 1 deletion lib/buffer.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
#include "buffer.h"

#include <arpa/inet.h>
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>

#ifdef _WIN32
#include <winsock2.h>
#else // _WIN32
#include <arpa/inet.h>
#endif // _WIN32

#include "definitions.h"
#include "files.h"
#include "logger.h"
Expand Down
7 changes: 6 additions & 1 deletion tests/check_buffer.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#include <arpa/inet.h>
#include <check.h>

#ifdef _WIN32
#include <winsock2.h>
#else // _WIN32
#include <arpa/inet.h>
#endif // _WIN32

#include "../lib/buffer.h"

START_TEST(test_LCH_Buffer) {
Expand Down

0 comments on commit 31f3df4

Please sign in to comment.