Page MenuHomePhabricator

Update seeder to use int64_t instead of time_t for Darwin
ClosedPublic

Authored by schancel on Oct 3 2017, 15:53.

Details

Summary

On MacOS X, time_t is a typedef for long. In order to
compile bitcoin-seeder on MacOS X we need to not
use time_t, and instead use int64_t.

Test Plan

make VERBOSE=1 check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
shammah/fix-seeder-macosx
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 937
Build 937: arc lint + arc unit

Event Timeline

I suspect this is totally wrong due to 64bit vs 32bit. This probably should not be merged. I'll look at a more comprehensive fix.

deadalnix requested changes to this revision.Oct 3 2017, 15:56
deadalnix added inline comments.
src/serialize.h
191 โ†—(On Diff #1479)

The size of a long is system dependent, you can't do that.

This revision now requires changes to proceed.Oct 3 2017, 15:56
schancel edited edge metadata.

Change time_t to int64_t to fix compiling on MacOS X

src/seeder/db.h
287

Why unsigned here and signed everywhere else?

schancel marked an inline comment as done.

Fix banned list to use int64_t for time.

src/seeder/db.h
287

Because I'm blind.

src/serialize.h
191 โ†—(On Diff #1479)

๐Ÿ‘ We're in agreement, I had already commented about that.

Builds and makes check for me.

I still have warnings on Mac, I'll try and squash those myself.

schancel retitled this revision from Add Serialize and Unserialize specializations for long to Update seeder to use int64_t instead of time_t for Darwin.Oct 4 2017, 07:43
This revision is now accepted and ready to land.Oct 4 2017, 08:18
This revision was automatically updated to reflect the committed changes.