udpxy: moved to github
[packages.git] / net / l2tpns / patches / 001-honor_includes_no_fifo_scheduler.patch
1 --- a/Makefile
2 +++ b/Makefile
3 @@ -11,17 +11,14 @@
4  DEFINES += -DETCDIR='"$(etcdir)"'
5  
6  OPTIM =
7 -OPTIM += -g
8  OPTIM += -O3
9  
10 -CC = gcc
11 -LD = gcc
12 -INCLUDES = -I.
13 +INCLUDES = -I. -I$(STAGING_DIR)/usr/include
14  CPPFLAGS = $(INCLUDES) $(DEFINES)
15  CFLAGS = -Wall -Wformat-security -Wno-format-zero-length $(OPTIM)
16 -LDFLAGS =
17 +LDFLAGS = -L$(STAGING_DIR)/usr/lib
18  LDLIBS =
19 -INSTALL = install -c -D -o root -g root
20 +INSTALL = install -c -D
21  
22  l2tpns.LIBS = -lm -lcli -ldl
23  
24 --- a/l2tpns.c
25 +++ b/l2tpns.c
26 @@ -4239,23 +4239,8 @@
27                 struct sched_param params = {0};
28                 params.sched_priority = 1;
29  
30 -               if (get_nprocs() < 2)
31 -               {
32 -                       LOG(0, 0, 0, "Not using FIFO scheduler, there is only 1 processor in the system.\n");
33 -                       config->scheduler_fifo = 0;
34 -               }
35 -               else
36 -               {
37 -                       if ((ret = sched_setscheduler(0, SCHED_FIFO, &params)) == 0)
38 -                       {
39 -                               LOG(1, 0, 0, "Using FIFO scheduler.  Say goodbye to any other processes running\n");
40 -                       }
41 -                       else
42 -                       {
43 -                               LOG(0, 0, 0, "Error setting scheduler to FIFO: %s\n", strerror(errno));
44 -                               config->scheduler_fifo = 0;
45 -                       }
46 -               }
47 +               LOG(0, 0, 0, "Not using FIFO scheduler, there is only 1 processor in the system.\n");
48 +               config->scheduler_fifo = 0;
49         }
50  
51         /* Set up the cluster communications port. */