Skip to content

Commit c5f977b

Browse files
yadijsquid-anubis
authored andcommitted
Maintenance: Add missing definitions to stub_fd.cc (#2340)
Make sure the stub provides all the symbols declared in fd.h
1 parent 7c122dd commit c5f977b

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

src/tests/stub_fd.cc

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,33 @@
77
*/
88

99
#include "squid.h"
10-
#include "fd.h"
11-
#include "fde.h"
1210

1311
#define STUB_API "fd.cc"
1412
#include "tests/STUB.h"
1513

16-
fde *fde::Table = nullptr;
17-
18-
int fdNFree(void) STUB_RETVAL(-1)
19-
void fd_open(int, unsigned int, const char *) STUB
14+
#include "fd.h"
2015
void fd_close(int) STUB
21-
void fd_bytes(int, int, IoDirection) STUB
16+
void fd_open(int, unsigned int, const char *) STUB
2217
void fd_note(int, const char *) STUB
18+
void fd_bytes(int, int, IoDirection) STUB
19+
void fdDumpOpen() STUB
20+
int fdUsageHigh() STUB
2321
void fdAdjustReserved() STUB
22+
int default_read_method(int, char *, int) STUB_RETVAL(0)
23+
int default_write_method(int, const char *, int) STUB_RETVAL(0)
24+
25+
// XXX: global. keep in sync with fd.cc
26+
const char *fdTypeStr[] = {
27+
"None",
28+
"Log",
29+
"File",
30+
"Socket",
31+
"Pipe",
32+
"MsgHdr",
33+
"Unknown"
34+
};
2435

36+
// XXX: should be in stub_fde.cc
37+
#include "fde.h"
38+
fde *fde::Table = nullptr;
39+
int fdNFree(void) STUB_RETVAL(-1)

0 commit comments

Comments
 (0)