comparison svr-main.c @ 1295:750ec4ec4cbe

Convert #ifdef to #if, other build changes
author Matt Johnston <matt@ucc.asn.au>
date Wed, 04 May 2016 15:33:40 +0200
parents 9169e4e7cbee
children 0c16b4ccbd54
comparison
equal deleted inserted replaced
1294:56aba7dedbea 1295:750ec4ec4cbe
41 #ifdef NON_INETD_MODE 41 #ifdef NON_INETD_MODE
42 static void main_noinetd(void); 42 static void main_noinetd(void);
43 #endif 43 #endif
44 static void commonsetup(void); 44 static void commonsetup(void);
45 45
46 #if defined(DBMULTI_dropbear) || !defined(DROPBEAR_MULTI) 46 #if defined(DBMULTI_dropbear) || !DROPBEAR_MULTI
47 #if defined(DBMULTI_dropbear) && defined(DROPBEAR_MULTI) 47 #if defined(DBMULTI_dropbear) && DROPBEAR_MULTI
48 int dropbear_main(int argc, char ** argv) 48 int dropbear_main(int argc, char ** argv)
49 #else 49 #else
50 int main(int argc, char ** argv) 50 int main(int argc, char ** argv)
51 #endif 51 #endif
52 { 52 {
142 } 142 }
143 143
144 /* fork */ 144 /* fork */
145 if (svr_opts.forkbg) { 145 if (svr_opts.forkbg) {
146 int closefds = 0; 146 int closefds = 0;
147 #ifndef DEBUG_TRACE 147 #if !DEBUG_TRACE
148 if (!opts.usingsyslog) { 148 if (!opts.usingsyslog) {
149 closefds = 1; 149 closefds = 1;
150 } 150 }
151 #endif 151 #endif
152 if (daemon(0, closefds) < 0) { 152 if (daemon(0, closefds) < 0) {
427 } 427 }
428 428
429 for (n = 0; n < (unsigned int)nsock; n++) { 429 for (n = 0; n < (unsigned int)nsock; n++) {
430 int sock = socks[sockpos + n]; 430 int sock = socks[sockpos + n];
431 set_sock_priority(sock, DROPBEAR_PRIO_LOWDELAY); 431 set_sock_priority(sock, DROPBEAR_PRIO_LOWDELAY);
432 #ifdef DROPBEAR_SERVER_TCP_FAST_OPEN 432 #if DROPBEAR_SERVER_TCP_FAST_OPEN
433 set_listen_fast_open(sock); 433 set_listen_fast_open(sock);
434 #endif 434 #endif
435 } 435 }
436 436
437 sockpos += nsock; 437 sockpos += nsock;