Skip to content

Commit a545aee

Browse files
committed
ci: remove dependency on pull/43987/head to track zephyr main directly
This is a temporary workaround until the mountain of tech-debt is flattened w.r.t the following: zephyrproject-rtos/zephyr#43987 #62 zephyrproject-rtos/zephyr#43998 zephyrproject-rtos/zephyr#46910 zephyrproject-rtos/zephyr#45100 but also around the mountain of tech-debt as a result of poor arch/posix software architecture, CONFIG_ARCH_POSIX and CONFIG_POSIX_API incompatibility, and the resultant spillover of moving POSIX definitions into the network subsystem as a result. Fixes #129 Signed-off-by: Christopher Friedt <[email protected]>
1 parent 3951a44 commit a545aee

File tree

8 files changed

+61
-22
lines changed

8 files changed

+61
-22
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ jobs:
4646
source zephyr-env.sh
4747
twister -i -G -T tests/
4848
49-
# - name: Build Samples
50-
# working-directory: thrift-for-zephyr
51-
# shell: bash
52-
# run: |
53-
# source zephyr-env.sh
54-
# twister -i --build-only -G -T samples/
49+
- name: Build Samples
50+
working-directory: thrift-for-zephyr
51+
shell: bash
52+
run: |
53+
source zephyr-env.sh
54+
twister -i --build-only -G -T samples/
5555
56-
# - name: Build Samples (POSIX)
57-
# working-directory: thrift-for-zephyr
58-
# shell: bash
59-
# run: |
60-
# make -j -C samples/lib/thrift/hello_client
61-
# make -j -C samples/lib/thrift/hello_server
56+
- name: Build Samples (POSIX)
57+
working-directory: thrift-for-zephyr
58+
shell: bash
59+
run: |
60+
make -j -C samples/lib/thrift/hello_client
61+
make -j -C samples/lib/thrift/hello_server
6262
6363
# - name: Archive firmware
6464
# uses: actions/upload-artifact@v2

lib/thrift/include/sys/poll.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* See https://pubs.opengroup.org/onlinepubs/9699919799/functions/poll.html
1818
*/
1919

20-
#include <poll.h>
20+
#include <zephyr/posix/poll.h>
2121

2222
/* sneaking this in here to avoid changing zephyr's <sys/ioctl.h> */
2323
#ifndef FIONREAD
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright 2022 Meta
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#pragma once
8+
9+
#define FIONBIO 0x5421
10+
11+
#ifdef __cplusplus
12+
extern "C" {
13+
#endif
14+
15+
/* Zephyr's header does not include this crucial declaration */
16+
int ioctl(int fd, unsigned long request, ...);
17+
18+
#include <zephyr/posix/sys/ioctl_calls.h>
19+
20+
#ifdef __cplusplus
21+
}
22+
#endif
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (c) 2022 Meta
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#pragma once
8+
9+
#ifdef __cplusplus
10+
extern "C" {
11+
#endif
12+
13+
__syscall int zephyr_ioctl(int fd, unsigned long request, va_list args);
14+
15+
#ifdef __cplusplus
16+
}
17+
#endif
18+
19+
#include <syscalls/ioctl_calls.h>

lib/thrift/src/thrift/server/TFDServer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#include <system_error>
99

1010
#include <errno.h>
11-
#include <poll.h>
12-
#include <sys/eventfd.h>
13-
#include <unistd.h>
11+
#include <zephyr/posix/poll.h>
12+
#include <zephyr/posix/sys/eventfd.h>
13+
#include <zephyr/posix/unistd.h>
1414

1515
#include <thrift/transport/TFDTransport.h>
1616

samples/lib/thrift/hello_server/src/HelloHandler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#pragma once
88

99
#ifdef __ZEPHYR__
10-
#include <zephyr.h>
10+
#include <zephyr/zephyr.h>
1111
#else
1212
#define printk printf
1313
#endif

west.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ manifest:
1414
remote: cfriedt
1515
path: thrift-for-zephyr/.upstream
1616
# corresponds to revision: v0.16.0, but the tag does not exist in cfriedt/thrift
17-
revision: 7372973987786312da8175e61c58d99e17c12df1
17+
revision: 63cad2ee536ead54e6ac75fb5401beb9ab2bbee2
1818
- name: net-tools
1919
remote: zephyrproject-rtos
2020
revision: master
2121
- name: zephyr
2222
remote: zephyrproject-rtos
23-
# Remove the need for 'posix/' prefix when including std headers
24-
# https://github.com/zephyrproject-rtos/zephyr/pull/43987
25-
revision: pull/43987/head
23+
revision: main
2624
import: true

0 commit comments

Comments
 (0)