Browse Source

bfg_strerror: Support for Windows system errors

Luke Dashjr 12 years ago
parent
commit
3cb169b5c1
2 changed files with 3 additions and 1 deletions
  1. 2 1
      util.c
  2. 1 0
      util.h

+ 2 - 1
util.c

@@ -2569,9 +2569,10 @@ const char *bfg_strerror(int e, enum bfg_strerror_type type)
 #endif
 			break;
 		case BST_SOCKET:
+		case BST_SYSTEM:
 		{
 #ifdef WIN32
-			// Windows has a different namespace for socket errors
+			// Windows has a different namespace for system and socket errors
 			LPSTR *msg = &bfgtls->bfg_strerror_socketresult;
 			if (*msg)
 				LocalFree(*msg);

+ 1 - 0
util.h

@@ -168,6 +168,7 @@ enum bfg_strerror_type {
 	BST_ERRNO,
 	BST_SOCKET,
 	BST_LIBUSB,
+	BST_SYSTEM,
 };
 extern const char *bfg_strerror(int, enum bfg_strerror_type);