Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 32bit support #1494

Merged
merged 2 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/c/.clangd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CompileFlags:
# Use gcc in development for better diagnostics
# & Ensure that compilation doesn't fail due to warnings
Compiler: gcc
Add: [-Wno-error]
Add: [-Wno-error, -xc, -std=c99]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-xc = use the C language instead of the default -xc++


Index:
# Enable background indexing for better symbol information
Expand All @@ -15,4 +15,3 @@ Diagnostics:
# Avoid running slow clang-tidy checks
ClangTidy:
FastCheckFilter: Loose

5 changes: 4 additions & 1 deletion packages/c/sshnpd/src/background_jobs.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
#include <sshnpd/background_jobs.h>
#include <sshnpd/sshnpd.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

const int64_t THIRTY_DAYS_MS = (int64_t)30 * 24 * 60 * 60 * 1000;

#define LOGGER_TAG "refresh_device_entry"

void *refresh_device_entry(void *void_refresh_device_entry_params) {
Expand Down Expand Up @@ -70,7 +73,7 @@ void *refresh_device_entry(void *void_refresh_device_entry_params) {
atclient_atkey_metadata_set_is_encrypted(metadata, true);
atclient_atkey_metadata_set_ttr(metadata, -1);
atclient_atkey_metadata_set_ccd(metadata, true);
atclient_atkey_metadata_set_ttl(metadata, (long)30 * 24 * 60 * 60 * 1000); // 30 days in ms
atclient_atkey_metadata_set_ttl(metadata, THIRTY_DAYS_MS);

buffer_len = strlen(params->params->manager_list[index]) + usernamekey_base_len;
// example: @client_atsign:device_info.device_name.sshnp@client_atsign
Expand Down