avrdude: Build fixes

This commit is contained in:
Vojtech Kral 2018-05-16 14:55:42 +02:00
parent 404fdbcfdf
commit fe21ca5510
5 changed files with 8 additions and 8 deletions

View File

@ -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)

View File

@ -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"

View File

@ -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 */

View File

@ -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>

View File

@ -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"