Skip to content

Commit

Permalink
ci: remove dependency on pull/43987/head to track zephyr main directly
Browse files Browse the repository at this point in the history
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 <cfriedt@fb.com>
  • Loading branch information
cfriedt committed Aug 11, 2022
1 parent 3951a44 commit 16a819b
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 21 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ jobs:
source zephyr-env.sh
twister -i -G -T tests/
# - name: Build Samples
# working-directory: thrift-for-zephyr
# shell: bash
# run: |
# source zephyr-env.sh
# twister -i --build-only -G -T samples/
- name: Build Samples
working-directory: thrift-for-zephyr
shell: bash
run: |
source zephyr-env.sh
twister -i --build-only -G -T samples/
# - name: Build Samples (POSIX)
# working-directory: thrift-for-zephyr
# shell: bash
# run: |
# make -j -C samples/lib/thrift/hello_client
# make -j -C samples/lib/thrift/hello_server
- name: Build Samples (POSIX)
working-directory: thrift-for-zephyr
shell: bash
run: |
make -j -C samples/lib/thrift/hello_client
make -j -C samples/lib/thrift/hello_server
# - name: Archive firmware
# uses: actions/upload-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion lib/thrift/include/sys/poll.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* See https://pubs.opengroup.org/onlinepubs/9699919799/functions/poll.html
*/

#include <poll.h>
#include <zephyr/posix/poll.h>

/* sneaking this in here to avoid changing zephyr's <sys/ioctl.h> */
#ifndef FIONREAD
Expand Down
22 changes: 22 additions & 0 deletions lib/thrift/include/zephyr/posix/sys/ioctl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2022 Meta
*
* SPDX-License-Identifier: Apache-2.0
*/

#pragma once

#define FIONBIO 0x5421

#ifdef __cplusplus
extern "C" {
#endif

/* Zephyr's header does not include this crucial declaration */
int ioctl(int fd, unsigned long request, ...);

#include <zephyr/posix/sys/ioctl_calls.h>

#ifdef __cplusplus
}
#endif
19 changes: 19 additions & 0 deletions lib/thrift/include/zephyr/posix/sys/ioctl_calls.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2022 Meta
*
* SPDX-License-Identifier: Apache-2.0
*/

#pragma once

#ifdef __cplusplus
extern "C" {
#endif

__syscall int zephyr_ioctl(int fd, unsigned long request, va_list args);

#ifdef __cplusplus
}
#endif

#include <syscalls/ioctl_calls.h>
6 changes: 3 additions & 3 deletions lib/thrift/src/thrift/server/TFDServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#include <system_error>

#include <errno.h>
#include <poll.h>
#include <sys/eventfd.h>
#include <unistd.h>
#include <zephyr/posix/poll.h>
#include <zephyr/posix/sys/eventfd.h>
#include <zephyr/posix/unistd.h>

#include <thrift/transport/TFDTransport.h>

Expand Down
6 changes: 2 additions & 4 deletions west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ manifest:
remote: cfriedt
path: thrift-for-zephyr/.upstream
# corresponds to revision: v0.16.0, but the tag does not exist in cfriedt/thrift
revision: 7372973987786312da8175e61c58d99e17c12df1
revision: 63cad2ee536ead54e6ac75fb5401beb9ab2bbee2
- name: net-tools
remote: zephyrproject-rtos
revision: master
- name: zephyr
remote: zephyrproject-rtos
# Remove the need for 'posix/' prefix when including std headers
# https://github.com/zephyrproject-rtos/zephyr/pull/43987
revision: pull/43987/head
revision: main
import: true

0 comments on commit 16a819b

Please sign in to comment.