Commit 72e7a55f authored by John Selbie's avatar John Selbie

fixes for solaris 11

parent d7a27efb
......@@ -15,6 +15,6 @@ clean:
rm -f $(PROJECT_OBJS) $(PROJECT_TARGET)
$(PROJECT_TARGET): $(PROJECT_OBJS)
$(LINK.cpp) -o $@ $^ $(LIB_PATH) $(LIBS)
$(LINK.cpp) -o $@ $^ $(LIB_PATH) $(LIBS) $(SOCKET_LIBS)
......@@ -10,6 +10,15 @@ DEBUG_FLAGS := -g
PROFILE_FLAGS := -O2 -g
FLAVOR_FLAGS = $(RELEASE_FLAGS)
#SOLARIS HACK
UNAME := $(shell uname -s)
ifeq ($(UNAME),SunOS)
SOCKET_LIBS := -lsocket -lnsl
endif
.PHONY: all clean debug
%.h.gch: %.h
......
......@@ -30,7 +30,11 @@ const option* CCmdLineParser::GenerateOptions()
{
option opt = {};
opt.has_arg = _listOptionDetails[index].has_arg;
opt.name = _listOptionDetails[index].strName.c_str();
// Solaris 11 (released in 2011), only sees fit to include header files from 2004 where "option::name" is just a char* and not const char*
opt.name = (char*)(_listOptionDetails[index].strName.c_str());
_options.push_back(opt);
}
......
......@@ -34,6 +34,7 @@
#include <unistd.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/time.h>
......@@ -43,6 +44,7 @@
#include <net/if.h>
#include <stdarg.h>
#include <math.h>
#include <sys/termios.h>
#include <boost/shared_ptr.hpp>
#include <boost/scoped_array.hpp>
......
......@@ -14,6 +14,6 @@ clean:
rm -f $(PROJECT_OBJS) $(PROJECT_TARGET)
$(PROJECT_TARGET): $(PROJECT_OBJS)
$(LINK.cpp) -o $@ $^ $(LIB_PATH) $(LIBS)
$(LINK.cpp) -o $@ $^ $(LIB_PATH) $(LIBS) $(SOCKET_LIBS)
......@@ -14,7 +14,7 @@ clean:
rm -f $(PROJECT_OBJS) $(PROJECT_TARGET)
$(PROJECT_TARGET): $(PROJECT_OBJS)
$(LINK.cpp) -o $@ $^ $(LIB_PATH) $(LIBS)
$(LINK.cpp) -o $@ $^ $(LIB_PATH) $(LIBS) $(SOCKET_LIBS)
......
......@@ -232,6 +232,12 @@ HRESULT CTestPolling::RemovePipe(int pipeindex)
ChkA(_spPolling->Remove(_pipes[pipeindex].readpipe));
close(_pipes[pipeindex].readpipe);
_pipes[pipeindex].readpipe = -1;
close(_pipes[pipeindex].writepipe);
_pipes[pipeindex].writepipe = -1;
_pipes.erase(_pipes.begin()+pipeindex);
Cleanup:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment