diff options
author | ultima-soul <akshayjhanji@hotmail.com> | 2019-10-15 17:57:54 -0700 |
---|---|---|
committer | ultima-soul <akshayjhanji@hotmail.com> | 2019-10-15 17:57:54 -0700 |
commit | 364d88ec2c762426d92fd987b9dfff629b21b8e9 (patch) | |
tree | 5ac57db2698c7eaccf5df45c6271a7799601a0cf /tools/br_ips/br_ips.c | |
parent | 94f722e719c585db0adbcc5954a3760973ff7ad7 (diff) | |
parent | efa8b91699400977f4ab1f2412a4747be3965420 (diff) |
Merge branch 'master' into data_dump
Diffstat (limited to 'tools/br_ips/br_ips.c')
-rw-r--r-- | tools/br_ips/br_ips.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/br_ips/br_ips.c b/tools/br_ips/br_ips.c index 440705cab..d144c5f39 100644 --- a/tools/br_ips/br_ips.c +++ b/tools/br_ips/br_ips.c @@ -1,4 +1,3 @@ -#define _POSIX_C_SOURCE 200808L // Don't use GNU getline #include <stdio.h> #include <stdint.h> #include <stdlib.h> @@ -20,6 +19,7 @@ static const char HELP[] = "br_ips\n" "Options:\n" " -h - show this message and exit\n"; +#if !defined(__CYGWIN__) && !defined(__APPLE__) && (_POSIX_C_SOURCE < 200809L || !_GNU_SOURCE) static int getline(char ** lineptr, size_t * n, FILE * stream) { // Static implementation of GNU getline int i = 0; @@ -49,6 +49,7 @@ static int getline(char ** lineptr, size_t * n, FILE * stream) { buf[i] = 0; return i; } +#endif static void getIncbinsFromFile(hunk_t ** hunks, size_t * num, size_t * maxnum, const char * fname, char ** strbuf, size_t * buffersize) { // Recursively find incbinned segments and encode them as hunks. |