|
From: | Dirk Ziegelmeier |
Subject: | Re: [lwip-devel] tftp_server.c on Windows |
Date: | Wed, 5 Oct 2016 21:03:05 +0200 |
There's some problems compiling tftp_server.c on Windows.
>From MSVC, I got errors like:
tftp_server.c(72): error C2059: syntax error: 'constant'
because 'ERROR_FILE_NOT_FOUND' is also in <winerror.h>.
Hence I had to patch:
--- a/tftp_server.c 2016-10-05 20:01:54
+++ b/tftp_server.c 2016-10-05 20:43:10
@@ -58,12 +58,21 @@
#define TFTP_MAX_PAYLOAD_SIZE 512
#define TFTP_HEADER_LENGTH 4
+#undef ERROR /* Also in <wingdi.h> */
+
#define RRQ 1
#define WRQ 2
#define DATA 3
#define ACK 4
#define ERROR 5
+/* These are also in <winerror.h>
+ */
+#undef ERROR_FILE_NOT_FOUND
+#undef ERROR_DISK_FULL
+#undef ERROR_FILE_EXISTS
+#undef ERROR_NO_SUCH_USER
+
enum tftp_error {
ERROR_FILE_NOT_FOUND = 1,
ERROR_ACCESS_VIOLATION = 2,
--
--gv
_______________________________________________
lwip-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-devel
[Prev in Thread] | Current Thread | [Next in Thread] |