Ticket #7235: 0001-Fix-undefined-reference-to-libm-functions-linking-to.patch

File 0001-Fix-undefined-reference-to-libm-functions-linking-to.patch, 1.6 KB (added by blueness, 7 years ago)

Cleaned up patch using git format-patch

  • src/tools/tor-fw-helper/include.am

    From 45933dbf3557cca5117190334251e9e20828072d Mon Sep 17 00:00:00 2001
    From: "Anthony G. Basile" <blueness@gentoo.org>
    Date: Sat, 27 Oct 2012 21:30:21 -0400
    Subject: [PATCH] Fix undefined reference to libm functions linking
     tor-fw-helper
    
    When configuring tor without upnp support, ie ./configure --disable-upnp,
    tor-fw-helper fails to link with undefined references to `ceil' and
    `log'.  This if fixed by linking to libm.
    
    X-Gentoo-Bug: 435040
    X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=435040
    Reported-by: Alexandre <alexandre.cortes@outlook.com>
    Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
    ---
     src/tools/tor-fw-helper/include.am |    4 ++--
     1 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/tools/tor-fw-helper/include.am b/src/tools/tor-fw-helper/include.am
    index cb6c9cd..275a0e2 100644
    a b endif 
    2323
    2424if MINIUPNPC
    2525miniupnpc_ldflags = @TOR_LDFLAGS_libminiupnpc@
    26 miniupnpc_ldadd = -lminiupnpc -lm @TOR_LIB_IPHLPAPI@
     26miniupnpc_ldadd = -lminiupnpc @TOR_LIB_IPHLPAPI@
    2727miniupnpc_cppflags = @TOR_CPPFLAGS_libminiupnpc@
    2828else
    2929miniupnpc_ldflags =
    miniupnpc_cppflags = 
    3232endif
    3333
    3434src_tools_tor_fw_helper_tor_fw_helper_LDFLAGS = $(nat_pmp_ldflags) $(miniupnpc_ldflags)
    35 src_tools_tor_fw_helper_tor_fw_helper_LDADD = src/common/libor.a $(nat_pmp_ldadd) $(miniupnpc_ldadd) @TOR_LIB_WS32@
     35src_tools_tor_fw_helper_tor_fw_helper_LDADD = src/common/libor.a $(nat_pmp_ldadd) $(miniupnpc_ldadd) -lm @TOR_LIB_WS32@
    3636src_tools_tor_fw_helper_tor_fw_helper_CPPFLAGS = $(nat_pmp_cppflags) $(miniupnpc_cppflags)