Ticket #7827: 0003-uhttpd-minor-cleanups.patch

File 0003-uhttpd-minor-cleanups.patch, 2.6 KB (added by dharding@…, 6 years ago)

[optional] minor cleanups to the code and makefiles made while implementing this feature

  • package/uhttpd/src/Makefile

    From d35c0a2376c15d5c831bc2f62b1d564ebd429562 Mon Sep 17 00:00:00 2001
    From: Daniel Harding <dharding@gmail.com>
    Date: Mon, 23 Aug 2010 09:46:56 +0000
    Subject: [PATCH 3/3] [uhttpd] minor cleanups
    
    ---
     package/uhttpd/src/Makefile     |   13 ++++++-------
     package/uhttpd/src/uhttpd-tls.c |    5 ++---
     package/uhttpd/src/uhttpd-tls.h |    1 -
     package/uhttpd/src/uhttpd.c     |    1 -
     package/uhttpd/src/uhttpd.h     |    1 -
     5 files changed, 8 insertions(+), 13 deletions(-)
    
    diff --git a/package/uhttpd/src/Makefile b/package/uhttpd/src/Makefile
    index 06309c0..373aa90 100644
    a b else 
    1818  TLS_LIB_DIR := ./cyassl-1.4.0/src/.libs 
    1919endif 
    2020 
    21 OBJ = uhttpd.o uhttpd-file.o uhttpd-utils.o 
    22 LIB = -Wl,--export-dynamic -lcrypt -ldl 
     21OBJ := uhttpd.o uhttpd-file.o uhttpd-utils.o 
     22LIB := -Wl,--export-dynamic -lcrypt -ldl 
    2323 
    24 TLSLIB = 
    25 LUALIB = 
     24TLSLIB := 
     25LUALIB := 
    2626 
    2727 
    2828world: compile 
    endif 
    3434 
    3535ifeq ($(LUA_SUPPORT),1) 
    3636  CFLAGS += -DHAVE_LUA 
    37   LUALIB = uhttpd_lua.so 
     37  LUALIB := uhttpd_lua.so 
    3838 
    3939  $(LUALIB): uhttpd-lua.c 
    4040                $(CC) $(CFLAGS) $(LDFLAGS) $(FPIC) \ 
    endif 
    4444 
    4545ifeq ($(TLS_SUPPORT),1) 
    4646  CFLAGS += -DHAVE_TLS 
    47   TLSLIB = uhttpd_tls.so 
     47  TLSLIB := uhttpd_tls.so 
    4848 
    4949  $(TLSLIB): uhttpd-tls.c 
    5050                $(CC) $(CFLAGS) $(LDFLAGS) $(FPIC) \ 
    compile: $(OBJ) $(TLSLIB) $(LUALIB) 
    6060 
    6161clean: 
    6262        rm -f *.o *.so uhttpd 
    63  
  • package/uhttpd/src/uhttpd-tls.c

    diff --git a/package/uhttpd/src/uhttpd-tls.c b/package/uhttpd/src/uhttpd-tls.c
    index b8c4c54..b12b81c 100644
    a b  
    2323 
    2424SSL_CTX * uh_tls_ctx_init() 
    2525{ 
    26         SSL_CTX *c = NULL; 
     26        SSL_CTX *c; 
     27 
    2728        SSL_load_error_strings(); 
    2829        SSL_library_init(); 
    2930 
    void uh_tls_client_close(struct client *c) 
    111112                c->tls = NULL; 
    112113        } 
    113114} 
    114  
    115  
  • package/uhttpd/src/uhttpd-tls.h

    diff --git a/package/uhttpd/src/uhttpd-tls.h b/package/uhttpd/src/uhttpd-tls.h
    index 59bb55b..24dfb44 100644
    a b int uh_tls_client_send(struct client *c, void *buf, int len); 
    3232void uh_tls_client_close(struct client *c); 
    3333 
    3434#endif 
    35  
  • package/uhttpd/src/uhttpd.c

    diff --git a/package/uhttpd/src/uhttpd.c b/package/uhttpd/src/uhttpd.c
    index a461b3c..8999f2b 100644
    a b int main (int argc, char **argv) 
    10441044 
    10451045        return 0; 
    10461046} 
    1047  
  • package/uhttpd/src/uhttpd.h

    diff --git a/package/uhttpd/src/uhttpd.h b/package/uhttpd/src/uhttpd.h
    index 2409ead..6b51985 100644
    a b struct http_response { 
    141141}; 
    142142 
    143143#endif 
    144