Skip to content

Commit

Permalink
Set the standard output to be unbuffered from the "adb_bridge" module
Browse files Browse the repository at this point in the history
  • Loading branch information
p1-mmr committed Jul 17, 2019
1 parent c3c0085 commit 8b5d190
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion inputs/adb_bridge/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CC := /home/marin/ndk/bin/arm-linux-androideabi-clang
CC := $(HOME)/ndk/bin/arm-linux-androideabi-clang

adb_bridge: adb_bridge.c
$(CC) adb_bridge.c -std=c99 -Werror -fPIE -pie -o adb_bridge
Binary file modified inputs/adb_bridge/adb_bridge
Binary file not shown.
4 changes: 4 additions & 0 deletions inputs/adb_bridge/adb_bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ void* diag_read_thread(void* arg) {
}

int main(void) {
/* Set the standard output to unbuffered */

setvbuf(stdout, NULL, _IONBF, 0);

char* diag_buffer = malloc(BUFFER_LEN);

int return_value;
Expand Down

0 comments on commit 8b5d190

Please sign in to comment.