mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-12-27 09:04:40 +01:00
35eaaf8e63
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>
16 lines
393 B
C
16 lines
393 B
C
#ifndef LIGHTNING_CLI_CONFIG_CLI_H
|
|
#define LIGHTNING_CLI_CONFIG_CLI_H
|
|
|
|
#include "config.h"
|
|
#include <stdio.h>
|
|
|
|
#ifndef CLN_TEST
|
|
/* Redefinition procedure is a very cool feature, but
|
|
if we try to redefine a procedure that is already
|
|
redefined somewhere (like read in alpine) we can have
|
|
tricky compilation error */
|
|
#define cli_read read
|
|
#endif
|
|
|
|
#endif /* LIGHTNING_CLI_CONFIG_CLI_H */
|