Skip to content
Browse files
system_win32: fix function prototype
- Change if_nametoindex parameter type from char * to const char *.

Follow-up to 09eef8a from this morning.

Bug: 09eef8a#r33716067
  • Loading branch information
gvanem authored and jay committed May 29, 2019
1 parent 6da44ed commit 48b9ea43790b48d27fbf226051f2540f762f2923
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/system_win32.h
@@ -49,7 +49,7 @@ typedef enum {
} PlatformIdentifier;

/* We use our own typedef here since some headers might lack this */
typedef unsigned int(WINAPI *IF_NAMETOINDEX_FN)(char *);
typedef unsigned int(WINAPI *IF_NAMETOINDEX_FN)(const char *);

/* This is used instread of if_nametoindex if available on Windows */
IF_NAMETOINDEX_FN Curl_if_nametoindex;

2 comments on commit 48b9ea4


This comment has been minimized.

Copy link

@captain-caveman2k captain-caveman2k replied May 29, 2019

Cheers Guys,

Ah it was the const I missed - doh!


This comment has been minimized.

Copy link
Contributor Author

@gvanem gvanem replied Jun 26, 2019

Still a warning from clang-cl:

./system_win32.h(55,19):  warning: no previous extern declaration for non-static variable 'Curl_if_nametoindex'
IF_NAMETOINDEX_FN Curl_if_nametoindex;

Why not extern IF_NAMETOINDEX_FN Curl_if_nametoindex;?

Please sign in to comment.