FreeBSD Bugzilla – Attachment 198913 Details for
Bug 232934
security/nmap: Fix build with libc++ 7.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Use ::bind instead plain bind
security__nmap-fix-bind-1.diff (text/plain), 2.73 KB, created by
Dimitry Andric
on 2018-11-03 14:09:52 UTC
(
hide
)
Description:
Use ::bind instead plain bind
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2018-11-03 14:09:52 UTC
Size:
2.73 KB
patch
obsolete
>Index: security/nmap/files/patch-nping_EchoServer.cc >=================================================================== >--- security/nmap/files/patch-nping_EchoServer.cc (nonexistent) >+++ security/nmap/files/patch-nping_EchoServer.cc (working copy) >@@ -0,0 +1,32 @@ >+--- nping/EchoServer.cc.orig 2018-01-28 21:18:17 UTC >++++ nping/EchoServer.cc >+@@ -281,12 +281,12 @@ int EchoServer::nep_listen_socket(){ >+ server_addr6.sin6_len = sizeof(struct sockaddr_in6); >+ #endif >+ /* Bind to local address and the specified port */ >+- if( bind(master_sd, (struct sockaddr *)&server_addr6, sizeof(server_addr6)) != 0 ){ >++ if( ::bind(master_sd, (struct sockaddr *)&server_addr6, sizeof(server_addr6)) != 0 ){ >+ nping_warning(QT_3, "Failed to bind to source address %s. Trying to bind to port %d...", IPtoa(server_addr6.sin6_addr), port); >+ /* If the bind failed for the supplied address, just try again with in6addr_any */ >+ if( o.spoofSource() ){ >+ server_addr6.sin6_addr = in6addr_any; >+- if( bind(master_sd, (struct sockaddr *)&server_addr6, sizeof(server_addr6)) != 0 ){ >++ if( ::bind(master_sd, (struct sockaddr *)&server_addr6, sizeof(server_addr6)) != 0 ){ >+ nping_fatal(QT_3, "Could not bind to port %d (%s).", port, strerror(errno)); >+ }else{ >+ nping_print(VB_1, "Server bound to port %d", port); >+@@ -319,12 +319,12 @@ int EchoServer::nep_listen_socket(){ >+ #endif >+ >+ /* Bind to local address and the specified port */ >+- if( bind(master_sd, (struct sockaddr *)&server_addr4, sizeof(server_addr4)) != 0 ){ >++ if( ::bind(master_sd, (struct sockaddr *)&server_addr4, sizeof(server_addr4)) != 0 ){ >+ nping_warning(QT_3, "Failed to bind to source address %s. Trying to bind to port %d...", IPtoa(server_addr4.sin_addr), port); >+ /* If the bind failed for the supplied address, just try again with in6addr_any */ >+ if( o.spoofSource() ){ >+ server_addr4.sin_addr.s_addr=INADDR_ANY; >+- if( bind(master_sd, (struct sockaddr *)&server_addr4, sizeof(server_addr4)) != 0 ){ >++ if( ::bind(master_sd, (struct sockaddr *)&server_addr4, sizeof(server_addr4)) != 0 ){ >+ nping_fatal(QT_3, "Could not bind to port %d (%s).", port, strerror(errno)); >+ }else{ >+ nping_print(VB_1, "Server bound to port %d", port); > >Property changes on: security/nmap/files/patch-nping_EchoServer.cc >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 232934
: 198913