Skip to content

Commit 47eeb98

Browse files
riptlmmcgee-jump
authored andcommitted
Fix RPC server build failure
Fixes an inverse dependency from RPC server to version.h, which can sometimes fail `make` runs in new checkouts.
1 parent 98f46dd commit 47eeb98

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/discof/rpcserver/fd_rpc_service.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,21 @@
1818
#include <netinet/in.h>
1919
#include <stdarg.h>
2020

21+
#ifdef __has_include
22+
#if __has_include("../../app/firedancer/version.h")
2123
#include "../../app/firedancer/version.h"
24+
#endif
25+
#endif
26+
27+
#ifndef FDCTL_MAJOR_VERSION
28+
#define FDCTL_MAJOR_VERSION 0
29+
#endif
30+
#ifndef FDCTL_MINOR_VERSION
31+
#define FDCTL_MINOR_VERSION 0
32+
#endif
33+
#ifndef FDCTL_PATCH_VERSION
34+
#define FDCTL_PATCH_VERSION 0
35+
#endif
2236

2337
#define CRLF "\r\n"
2438
#define MATCH_STRING(_text_,_text_sz_,_str_) (_text_sz_ == sizeof(_str_)-1 && memcmp(_text_, _str_, sizeof(_str_)-1) == 0)

0 commit comments

Comments
 (0)