HI,
I try to compile telldus-core-2.1.1 on archlinux but I get this error:
/telldus-core-2.1.1/common/Socket_unix.cpp: In destructor virtual TelldusCore::Socket::~Socket()
/telldus-core-2.1.1/common/Socket_unix.cpp:44:18: erreur: close was not declared in this scope
The code in Socket_unix.cpp
Socket::~Socket(void) {
if(d->socket){
close(d->socket);
}
delete d;
}
I'm on Archlinux 3.1.10-11-ARCH on armv5tel
any idea ?
Compilation error Telldus-core-2.1.1
Moderator: Telldus
-
- Posts: 2
- Joined: Fri Mar 17, 2023 9:45 am
Re: Compilation error Telldus-core-2.1.1
I found !!!
Need to add the include <unistd.h> for linux in the common/Socket.h
FROM
#ifdef _WINDOWS
7 #include <windows.h>
8 typedef HANDLE SOCKET_T;
9 #else
10 typedef int SOCKET_T;
11 #endif
TO
#ifdef _WINDOWS
7 #include <windows.h>
8 typedef HANDLE SOCKET_T;
9 #else
#include <unistd.h>
10 typedef int SOCKET_T;
11 #endif
Need to add the include <unistd.h> for linux in the common/Socket.h
FROM
#ifdef _WINDOWS
7 #include <windows.h>
8 typedef HANDLE SOCKET_T;
9 #else
10 typedef int SOCKET_T;
11 #endif
TO
#ifdef _WINDOWS
7 #include <windows.h>
8 typedef HANDLE SOCKET_T;
9 #else
#include <unistd.h>
10 typedef int SOCKET_T;
11 #endif
Re: Compilation error Telldus-core-2.1.1
Thanks houlalajaimal!!
Worked like a charm!
Worked like a charm!
-
- Site Admin
- Posts: 2243
- Joined: Fri Mar 17, 2023 9:45 am
- Location: Lund
- Contact:
Re: Compilation error Telldus-core-2.1.1
Fixed in the next version:
http://developer.telldus.com/ticket/216
http://developer.telldus.com/ticket/216
Micke Prag
Software
Telldus Technologies
Software
Telldus Technologies