avrdude: Build fixes
This commit is contained in:
parent
404fdbcfdf
commit
fe21ca5510
5 changed files with 8 additions and 8 deletions
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
add_definitions(-D_BSD_SOURCE -D_DEFAULT_SOURCE) # To enable various useful macros and functions on Unices
|
||||||
remove_definitions(-D_UNICODE -DUNICODE)
|
remove_definitions(-D_UNICODE -DUNICODE)
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
set(CMAKE_C_STANDARD 99)
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
|
|
@ -41,9 +41,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#if defined(WIN32NATIVE)
|
|
||||||
# include <malloc.h> /* for alloca() */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "avrdude.h"
|
#include "avrdude.h"
|
||||||
#include "libavrdude.h"
|
#include "libavrdude.h"
|
||||||
|
|
|
@ -933,6 +933,13 @@ int read_config(const char * file);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Header file for alloca()
|
||||||
|
#if defined(WIN32NATIVE)
|
||||||
|
# include <malloc.h>
|
||||||
|
#else
|
||||||
|
# include <alloca.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* formerly confwin.h */
|
/* formerly confwin.h */
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,6 @@
|
||||||
|
|
||||||
#if !defined(WIN32NATIVE)
|
#if !defined(WIN32NATIVE)
|
||||||
|
|
||||||
#define _BSD_SOURCE // Needed to enable various macros (such as h_addr)
|
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
@ -35,9 +35,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#if defined(WIN32NATIVE)
|
|
||||||
# include <malloc.h> /* for alloca() */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "avrdude.h"
|
#include "avrdude.h"
|
||||||
#include "libavrdude.h"
|
#include "libavrdude.h"
|
||||||
|
|
Loading…
Reference in a new issue