mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
cli: change the redefine logic to read from the stdin
Procedure redefinition is a very cool feature but when other libraries redefine the same function can be very tricky to avoid compilation error. This PR proposed a change of logic and use a customizzation function definition to read from the stdin, so we can avoid future error at compile time. However, we could be check also the os or compiler that cause the error and redefine the missing function. Changelog-None: Fixed compilation error due redefinition procedure. Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit is contained in:
committed by
Christian Decker
parent
52b1f5a8f4
commit
35eaaf8e63
@@ -1,4 +1,5 @@
|
||||
#include "config.h"
|
||||
#include "config_test.h"
|
||||
#include <common/amount.h>
|
||||
#include <common/bigsize.h>
|
||||
#include <common/channel_id.h>
|
||||
@@ -18,7 +19,7 @@ int test_printf(const char *format, ...);
|
||||
int test_chdir(const char *path);
|
||||
|
||||
#define main test_main
|
||||
#define read test_read
|
||||
#define cli_read test_read
|
||||
#define socket test_socket
|
||||
#define connect test_connect
|
||||
#define getpid test_getpid
|
||||
|
||||
Reference in New Issue
Block a user