Skip to content

Commit

Permalink
fix(ci): fix CI errors with GNU 8.3.0
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Terzolo <[email protected]>
  • Loading branch information
Andreagit97 committed Dec 2, 2024
1 parent 1373517 commit 6080c16
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 2 additions & 0 deletions userspace/libscap/engine/savefile/converter/converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ limitations under the License.
#include <stdexcept>
#include <memory>

extern uint8_t scap_get_size_bytes_from_type(enum ppm_param_type t);

typedef std::shared_ptr<scap_evt> safe_scap_evt_t;

static inline safe_scap_evt_t safe_scap_evt(scap_evt *evt) {
Expand Down
18 changes: 10 additions & 8 deletions userspace/libscap/engine/savefile/converter/table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ const std::unordered_map<conversion_key, conversion_info> g_conversion_table = {
////////////////////////////
// READ
////////////////////////////
{{PPME_SYSCALL_READ_E, 2}, {.action = C_ACTION_STORE}},
{{PPME_SYSCALL_READ_X, 2},
{.action = C_ACTION_ADD_PARAMS,
.instr = {{C_INSTR_FROM_ENTER, 0}, {C_INSTR_FROM_ENTER, 1}}}},
{conversion_key{PPME_SYSCALL_READ_E, 2}, conversion_info{.action = C_ACTION_STORE}},
{conversion_key{PPME_SYSCALL_READ_X, 2},
conversion_info{.action = C_ACTION_ADD_PARAMS,
.instr = {{C_INSTR_FROM_ENTER, 0}, {C_INSTR_FROM_ENTER, 1}}}},
////////////////////////////
// PREAD
////////////////////////////
{{PPME_SYSCALL_PREAD_E, 3}, {.action = C_ACTION_STORE}},
{{PPME_SYSCALL_PREAD_X, 2},
{.action = C_ACTION_ADD_PARAMS,
.instr = {{C_INSTR_FROM_ENTER, 0}, {C_INSTR_FROM_ENTER, 1}, {C_INSTR_FROM_ENTER, 2}}}},
{conversion_key{PPME_SYSCALL_PREAD_E, 3}, conversion_info{.action = C_ACTION_STORE}},
{conversion_key{PPME_SYSCALL_PREAD_X, 2},
conversion_info{.action = C_ACTION_ADD_PARAMS,
.instr = {{C_INSTR_FROM_ENTER, 0},
{C_INSTR_FROM_ENTER, 1},
{C_INSTR_FROM_ENTER, 2}}}},
};
2 changes: 1 addition & 1 deletion userspace/libscap/engine/savefile/scap_savefile.c
Original file line number Diff line number Diff line change
Expand Up @@ -2027,7 +2027,7 @@ static int32_t next(struct scap_engine_handle engine,
uint16_t *pdevid,
uint32_t *pflags) {
struct savefile_engine *handle = engine.m_handle;
read_event:
read_event:;
int32_t res = next_event_from_file(handle, pevent, pdevid, pflags);
// If we fail we don't convert the event.
if(res != SCAP_SUCCESS) {
Expand Down

0 comments on commit 6080c16

Please sign in to comment.