Skip to content

Commit d427ae7

Browse files
author
Artiom N.
committed
Examples build fix
1 parent f1234fc commit d427ae7

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

src/book01/ch22/cpp/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ cmake_minimum_required(VERSION 3.10)
33
add_subdirectory("promisc_switcher")
44
add_subdirectory("raw_sniffer")
55
add_subdirectory("pcap_sniffer")
6+
7+
if (NOT WIN32)
8+
add_subdirectory(pcappp-example)
9+
endif()
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
cmake_minimum_required(VERSION 3.10)
2+
3+
project("${CHAPTER_NAME}pcapp-example" C CXX)
4+
5+
find_package(PcapPlusPlus)
6+
7+
add_executable("${PROJECT_NAME}" "main.cpp")
8+
target_link_libraries("${PROJECT_NAME}" PcapPlusPlus::Pcap++)

src/book03/ch14/cpp/tg-arm-bot/server/server_tg.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#include <exception>
77
#include <iostream>
88
#include <sstream>
9+
#include <utility>
10+
#include <vector>
911

1012

1113
using namespace TgBot;
@@ -148,7 +150,7 @@ void create_and_run_tg_bot(const std::string& token, CommandHandler on_command)
148150

149151
if (StringTools::startsWith(message->text, "/start"))
150152
{
151-
bot.getApi().sendMessage(message->chat->id, "Bot started...", false, 0, keyboard);
153+
bot.getApi().sendMessage(message->chat->id, "Bot started...", nullptr, 0, keyboard);
152154
return;
153155
}
154156

0 commit comments

Comments
 (0)