Skip to content

Commit

Permalink
fix(userspace/libsinsp): missing ifndef for minimal build in addrinfo
Browse files Browse the repository at this point in the history
Co-authored-by: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
  • Loading branch information
leodido and leogr committed Sep 10, 2020
1 parent e3713a3 commit 46b90ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion userspace/libsinsp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ include_directories(../async)
include_directories(./include)
include_directories("${JSONCPP_INCLUDE}")
include_directories("${LUAJIT_INCLUDE}")
include_directories("${CARES_INCLUDE}")

if(NOT WIN32 AND NOT APPLE)
include_directories("${B64_INCLUDE}")
Expand All @@ -32,6 +31,7 @@ if(NOT WIN32 AND NOT APPLE)
include_directories("${PROTOBUF_INCLUDE}")
include_directories("${OPENSSL_INCLUDE_DIR}")
include_directories("${CURL_INCLUDE_DIR}")
include_directories("${CARES_INCLUDE}")
endif() # NOT MINIMAL_BUILD
include_directories("${JQ_INCLUDE}")
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
Expand Down
3 changes: 2 additions & 1 deletion userspace/libsinsp/addrinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

#ifndef MINIMAL_BUILD
#include "addrinfo.h"

#include <ares.h>
Expand All @@ -38,3 +38,4 @@ void ares_cb(void *arg, int status, int timeouts, struct hostent *host)
res->done = true;
}
}
#endif // MINIMAL_BUILD

0 comments on commit 46b90ad

Please sign in to comment.