Can you just test something like
address.sin_addr = inet_addr(ip);
Instead of
inet_pton(AF_INET, ip, &address.sin_addr);
Src/Network/UDPSend.cpp: In member function 'bool SMUDP::UDPSend::Send(const char*, int, int, const void*, int)':
Src/Network/UDPSend.cpp:83:33: error: no match for 'operator=' (operand types are 'in_addr' and 'long unsigned int')
address.sin_addr = inet_addr(ip);
^
In file included from D:/.dev/msys64/mingw64/x86_64-w64-mingw32/include/winsock2.h:54:0,
from Src/Network/UDPSend.cpp:1:
D:/.dev/msys64/mingw64/x86_64-w64-mingw32/include/inaddr.h:17:16: note: candidate: constexpr in_addr& in_addr::operator=(const in_addr&)
typedef struct in_addr {
^~~~~~~
D:/.dev/msys64/mingw64/x86_64-w64-mingw32/include/inaddr.h:17:16: note: no known conversion for argument 1 from 'long unsigned int' to 'const in_addr&'
D:/.dev/msys64/mingw64/x86_64-w64-mingw32/include/inaddr.h:17:16: note: candidate: constexpr in_addr& in_addr::operator=(in_addr&&)
D:/.dev/msys64/mingw64/x86_64-w64-mingw32/include/inaddr.h:17:16: note: no known conversion for argument 1 from 'long unsigned int' to 'in_addr&&'
make: *** [Makefiles/Makefile.inc:324: _obj/UDPSend.o] Error 1
Ian wrote:But it doesn't compile with visual studio
Error 1 error C4996: 'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings udpsend.cpp
Ian wrote:I guess we could put an #ifdef in there if it works with your compiler
#ifdef __GNUC__
// Code compatible with GNU toolchain
#endif
Ian wrote:So yeah I can see the possibility of some conflict there
**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#ifndef _IO_H_
#define _IO_H_
#include <crtdefs.h>
#include <string.h>
#if defined(__LIBMSVCRT__)
/* When building mingw-w64, this should be blank. */
#define _SECIMP
#else
#ifndef _SECIMP
#define _SECIMP __declspec(dllimport)
#endif /* _SECIMP */
#endif /* defined(_CRTBLD) || defined(__LIBMSVCRT__) */
#pragma pack(push,_CRT_PACKING)
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP char* __cdecl _getcwd (char*, int);
#ifndef _FSIZE_T_DEFINED
typedef unsigned long _fsize_t;
#define _FSIZE_T_DEFINED
#endif
[...]
Src/Debugger/CPU/Musashi68KDebug.h:57:8: error: extra qualification 'Debugger::CMusashi68KDebug::' on member 'SetM68KContext' [-fpermissive]
void CMusashi68KDebug::SetM68KContext()
[...]
/***
*io.h - declarations for low-level file handling and I/O functions
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file contains the function declarations for the low-level
* file handling and I/O functions.
*
* [Public]
*
****/
#pragma once
#ifndef _INC_IO
#define _INC_IO
#include <crtdefs.h>
/*
* Currently, all MS C compilers for Win32 platforms default to 8 byte
* alignment.
*/
#pragma pack(push,_CRT_PACKING)
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#ifndef _FSIZE_T_DEFINED
typedef unsigned long _fsize_t; /* Could be 64 bits for Win32 */
Ian wrote:Try the current build, hopefully I didn't break anything else >_<
Users browsing this forum: No registered users and 1 guest