eal/windows: fix C++ compatibility
authorTyler Retzlaff <roretzla@linux.microsoft.com>
Fri, 15 Jan 2021 19:38:21 +0000 (11:38 -0800)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 17 Jan 2021 17:27:48 +0000 (18:27 +0100)
Explicitly cast void * to type * so that EAL headers may be compiled
as C or C++.

Fixes: e8428a9d89f1 ("eal/windows: add some basic functions and macros")
Cc: stable@dpdk.org
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
lib/librte_eal/windows/include/rte_os.h

index ea3fe60..7ef38ff 100644 (file)
@@ -86,7 +86,7 @@ asprintf(char **buffer, const char *format, ...)
                return -1;
        size++;
 
-       *buffer = malloc(size);
+       *buffer = (char *)malloc(size);
        if (*buffer == NULL)
                return -1;