mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-23 23:32:49 +02:00
[tools] more cygwin related build fixes
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15227 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
b2b8e3bed8
commit
a6e38696e8
@ -1,3 +1,3 @@
|
|||||||
#ifdef __linux__
|
#if defined(__linux__) || defined(__CYGWIN__)
|
||||||
#include_next <byteswap.h>
|
#include_next <byteswap.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef __endian_compat_h
|
#ifndef __endian_compat_h
|
||||||
#define __endian_compat_h
|
#define __endian_compat_h
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__) || defined(__CYGWIN__)
|
||||||
#include <byteswap.h>
|
#include <byteswap.h>
|
||||||
#include_next <endian.h>
|
#include_next <endian.h>
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
|
@ -40,10 +40,16 @@
|
|||||||
static inline ssize_t
|
static inline ssize_t
|
||||||
getline(char **outbuf, size_t *outsize, FILE *fp)
|
getline(char **outbuf, size_t *outsize, FILE *fp)
|
||||||
{
|
{
|
||||||
char *buf;
|
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
|
#ifndef __CYGWIN__
|
||||||
|
char *buf;
|
||||||
buf = fgetln(fp, &len);
|
buf = fgetln(fp, &len);
|
||||||
|
#else
|
||||||
|
char buf[512];
|
||||||
|
fgets(buf, sizeof(buf), fp);
|
||||||
|
len = strlen(buf);
|
||||||
|
#endif
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user