mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 17:16:51 +00:00
Streamdev 0.5.0-rc1
This commit is contained in:
34
tools/Makefile
Normal file
34
tools/Makefile
Normal file
@@ -0,0 +1,34 @@
|
||||
#
|
||||
# Makefile for a Video Disk Recorder plugin
|
||||
#
|
||||
# $Id: Makefile,v 1.1.2.1 2010/06/14 10:40:31 schmirl Exp $
|
||||
|
||||
### The object files (add further files here):
|
||||
|
||||
OBJS = select.o socket.o source.o tools.o
|
||||
|
||||
### The main target:
|
||||
|
||||
.PHONY: clean
|
||||
sockettools.a: $(OBJS)
|
||||
ar -rcs sockettools.a $(OBJS)
|
||||
|
||||
### Implicit rules:
|
||||
|
||||
%.o: %.c
|
||||
$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
|
||||
|
||||
### Dependencies:
|
||||
|
||||
MAKEDEP = $(CXX) -MM -MG
|
||||
DEPFILE = .dependencies
|
||||
|
||||
$(DEPFILE): Makefile
|
||||
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
||||
### Targets:
|
||||
|
||||
clean:
|
||||
@-rm -f $(OBJS) $(DEPFILE) *.a core* *~
|
@@ -124,6 +124,10 @@ bool cTBSocket::Accept(const cTBSocket &Listener) {
|
||||
if (::getsockname(socket, (struct sockaddr*)&m_LocalAddr, &addrlen) == -1)
|
||||
return false;
|
||||
|
||||
int sol=1;
|
||||
// Ignore possible errors here, proceed as usual
|
||||
::setsockopt(socket, SOL_SOCKET, SO_KEEPALIVE, &sol, sizeof(sol));
|
||||
|
||||
if (!cTBSource::Open(socket))
|
||||
return false;
|
||||
|
||||
|
Reference in New Issue
Block a user