Ticket #7235: tor-0.2.4.5-fix-udef-ref-math.patch

File tor-0.2.4.5-fix-udef-ref-math.patch, 1.4 KB (added by blueness, 7 years ago)

Improved patch

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

    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>
    ---
    
    diff -Naur tor-0.2.4.5-alpha.orig/src/tools/tor-fw-helper/include.am tor-0.2.4.5-alpha/src/tools/tor-fw-helper/include.am
    old new  
    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 =
     
    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)