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

Minor fixes to improve compatibility between the POSIX API and native builds #63866

Merged
merged 4 commits into from
Oct 20, 2023
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
2 changes: 1 addition & 1 deletion include/zephyr/posix/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef ZEPHYR_INCLUDE_POSIX_TYPES_H_
#define ZEPHYR_INCLUDE_POSIX_TYPES_H_

#ifndef CONFIG_ARCH_POSIX
#if !(defined(CONFIG_ARCH_POSIX) && defined(CONFIG_EXTERNAL_LIBC))
#include <sys/types.h>
#endif

Expand Down
1 change: 1 addition & 0 deletions tests/posix/eventfd/src/stress.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ static void th_fun(void *arg1, void *arg2, void *arg3)
report += report_ms;
}
}
Z_SPIN_DELAY(10);
}

printk("avg: %zu %s/s\n", (size_t)((count[id] * MSEC_PER_SEC) / end_ms), msg[id]);
Expand Down
4 changes: 0 additions & 4 deletions tests/posix/getopt/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
#include <zephyr/kernel.h>
#include <zephyr/ztest.h>
#include <string.h>
#ifdef CONFIG_ARCH_POSIX
#include <unistd.h>
#else
#include <zephyr/posix/unistd.h>
#endif
#include <getopt.h>

ZTEST_SUITE(getopt_test_suite, NULL, NULL, NULL, NULL, NULL);
Expand Down
1 change: 1 addition & 0 deletions tests/posix/pthread_pressure/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ static void test_create_join_common(const char *tag, create_fn create, join_fn j

print_stats(now_ms, end_ms);
}
Z_SPIN_DELAY(100);
} while (end_ms > now_ms);

print_stats(now_ms, end_ms);
Expand Down
Loading