(я в СИ не разбераюсь вообще, решил спросить тут знающих людей)
Код: Выделить всё
...
g++ -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -I/usr/local/include -I/usr/local/include/verlihub -I/usr/local/include/mysql -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/local/include -MT cthlconn.lo -MD -MP -MF .deps/cthlconn.Tpo -c cthlconn.cpp -fPIC -DPIC -o .libs/cthlconn.o
cthlconn.cpp: In constructor 'cTHLConn::cTHLConn(std::string, int, nDirectConnect::nTables::cTHubLinkData*)':
cthlconn.cpp:39: error: 'SO_KEEPALIVE' was not declared in this scope
cthlconn.cpp: In constructor 'cTHLConn::cTHLConn(nServer::tSocket)':
cthlconn.cpp:50: error: 'SO_KEEPALIVE' was not declared in this scope
*** Error code 1
Stop in /home/savio/verlihub/thublink-0.1.16/src.
*** Error code 1
Stop in /home/savio/verlihub/thublink-0.1.16.
*** Error code 1
Stop in /home/savio/verlihub/thublink-0.1.16.
[root@server ~/verlihub/thublink-0.1.16]#
кстати сам файл cthlconn.cpp
Код: Выделить всё
/***************************************************************************
* Copyright (C) 2006 by Pavel Boldin *
* boldin.pavel@gmail.com *
* *
* Copyright (C) 2004 by Janos Horvath and Daniel Muller *
* bourne@freemail.hu and dan@verliba.cz *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "cthlconn.h"
#include "cthublink.h"
#include "cpithublink.h"
#include <iostream>
using namespace nDirectConnect;
cTHLConn::cTHLConn(string HubAddr, int HubPort, cTHubLinkData* LinkData):
cAsyncConn(HubAddr, HubPort), mLinkData(LinkData)
{
int so_keepalive = 1;
SetClassName("cTHLConn");
SetSockOpt(SO_KEEPALIVE, &so_keepalive, sizeof(int));
mType = eCT_CLIENT;
}
cTHLConn::cTHLConn(tSocket mSockDesc):
cAsyncConn(mSockDesc), mLinkData(NULL)
{
int so_keepalive = 1;
SetClassName("cTHLConn");
SetSockOpt(SO_KEEPALIVE, &so_keepalive, sizeof(int));
mType = eCT_CLIENT;
}
int cTHLConn::OnCloseNow()
{
if(Log(10)) LogStream() << "cTHLConn::OnCloseNow" << endl;
// if(mLinkData)
// mLinkData->SwitchToOffline();
}
[root@server ~/verlihub/thublink-0.1.16/src]#