avrdude: Build fixes
This commit is contained in:
parent
404fdbcfdf
commit
fe21ca5510
@ -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)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
@ -41,9 +41,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#if defined(WIN32NATIVE)
|
||||
# include <malloc.h> /* for alloca() */
|
||||
#endif
|
||||
|
||||
#include "avrdude.h"
|
||||
#include "libavrdude.h"
|
||||
|
@ -933,6 +933,13 @@ int read_config(const char * file);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Header file for alloca()
|
||||
#if defined(WIN32NATIVE)
|
||||
# include <malloc.h>
|
||||
#else
|
||||
# include <alloca.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* formerly confwin.h */
|
||||
|
||||
|
@ -25,8 +25,6 @@
|
||||
|
||||
#if !defined(WIN32NATIVE)
|
||||
|
||||
#define _BSD_SOURCE // Needed to enable various macros (such as h_addr)
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -35,9 +35,6 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#if defined(WIN32NATIVE)
|
||||
# include <malloc.h> /* for alloca() */
|
||||
#endif
|
||||
|
||||
#include "avrdude.h"
|
||||
#include "libavrdude.h"
|
||||
|
Loading…
Reference in New Issue
Block a user